clang: fix -Wunused-but-set-variable

This commit is contained in:
wmayer
2023-03-12 13:56:54 +01:00
committed by wwmayer
parent 4cd350d2d0
commit 2a970b3045
11 changed files with 15 additions and 24 deletions

View File

@@ -371,14 +371,12 @@ std::vector<LineSet> DrawGeomHatch::getTrimmedLines(DrawViewPart* source,
}
std::vector<TechDraw::BaseGeomPtr> resultGeoms;
int i = 0;
for (auto& e: resultEdges) {
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
if (!base) {
throw Base::ValueError("DGH::getTrimmedLines - baseFactory failed");
}
resultGeoms.push_back(base);
i++;
}
ls.setEdges(resultEdges);
ls.setGeoms(resultGeoms);
@@ -531,14 +529,12 @@ std::vector<LineSet> DrawGeomHatch::getFaceOverlay(int fdx)
PATLineSpec hl = ls.getPATLineSpec();
std::vector<TopoDS_Edge> candidates = DrawGeomHatch::makeEdgeOverlay(hl, bBox, ScalePattern.getValue());
std::vector<TechDraw::BaseGeomPtr> resultGeoms;
int i = 0;
for (auto& e: candidates) {
TechDraw::BaseGeomPtr base = BaseGeom::baseFactory(e);
if (!base) {
throw Base::ValueError("DGH::getFaceOverlay - baseFactory failed");
}
resultGeoms.push_back(base);
i++;
}
ls.setEdges(candidates);
ls.setGeoms(resultGeoms);