Part: modernize C++: use range-based for loop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user