Part: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-15 17:28:50 +02:00
committed by Chris Hennes
parent 9a1f8a11d6
commit 312975edba
49 changed files with 364 additions and 365 deletions

View File

@@ -132,8 +132,8 @@ App::DocumentObjectExecReturn *MultiCommon::execute()
history.push_back(hist2);
}
else {
for (std::vector<ShapeHistory>::iterator jt = history.begin(); jt != history.end(); ++jt)
*jt = joinHistory(*jt, hist1);
for (auto & jt : history)
jt = joinHistory(jt, hist1);
history.push_back(hist2);
}
}
@@ -154,8 +154,8 @@ App::DocumentObjectExecReturn *MultiCommon::execute()
BRepBuilderAPI_RefineModel mkRefine(oldShape);
resShape = mkRefine.Shape();
ShapeHistory hist = buildHistory(mkRefine, TopAbs_FACE, resShape, oldShape);
for (std::vector<ShapeHistory>::iterator jt = history.begin(); jt != history.end(); ++jt)
*jt = joinHistory(*jt, hist);
for (auto & jt : history)
jt = joinHistory(jt, hist);
}
catch (Standard_Failure&) {
// do nothing