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);

View File

@@ -93,13 +93,13 @@ void TaskLinkDim::loadAvailDims()
std::vector<App::DocumentObject*>::iterator itView = pageViews.begin();
std::string result;
int selRefType = TechDraw::DrawViewDimension::getRefTypeSubElements(m_subs);
int found = 0;
//int found = 0;
for (; itView != pageViews.end(); itView++) {
if ((*itView)->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())) {
TechDraw::DrawViewDimension* dim = static_cast<TechDraw::DrawViewDimension*>((*itView));
int dimRefType = dim->getRefType();
if (dimRefType == selRefType) { //potential matches
found++;
// found++;
if (dim->has3DReferences()) {
if (dimReferencesSelection(dim)) {
loadToTree(dim, true, guiDoc);