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 3e09b8ee2d
commit 7cb51a4980
49 changed files with 364 additions and 365 deletions

View File

@@ -131,8 +131,8 @@ App::DocumentObjectExecReturn *MultiFuse::execute()
throw Base::RuntimeError("MultiFusion failed");
TopoDS_Shape resShape = mkFuse.Shape();
for (std::vector<TopoDS_Shape>::iterator it = s.begin(); it != s.end(); ++it) {
history.push_back(buildHistory(mkFuse, TopAbs_FACE, resShape, *it));
for (const auto & it : s) {
history.push_back(buildHistory(mkFuse, TopAbs_FACE, resShape, it));
}
if (resShape.IsNull())
throw Base::RuntimeError("Resulting shape is null");
@@ -151,8 +151,8 @@ App::DocumentObjectExecReturn *MultiFuse::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