diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp index 1b5e5b4fa3..a6d8176c0a 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp @@ -210,11 +210,9 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire) } ShapeValidator validator; - for(std::size_t i = 0; i < boundary.size(); i++) { - App::PropertyLinkSubList::SubSet set = boundary[i]; - + for(const auto& set : boundary) { if (set.first->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - for (const auto& jt: set.second) { + for (const auto& jt : set.second) { const Part::TopoShape &ts = static_cast(set.first)->Shape.getShape(); validator.checkAndAdd(ts, jt.c_str(), &aWD); } diff --git a/src/Mod/Surface/App/FeatureSewing.cpp b/src/Mod/Surface/App/FeatureSewing.cpp index 6c3da19476..54ec9249ff 100644 --- a/src/Mod/Surface/App/FeatureSewing.cpp +++ b/src/Mod/Surface/App/FeatureSewing.cpp @@ -73,15 +73,15 @@ App::DocumentObjectExecReturn *Sewing::execute() BRepBuilderAPI_Sewing builder(atol,opt1,opt2,opt3,opt4); std::vector subset = ShapeList.getSubListValues(); - for(std::vector::iterator it = subset.begin(); it != subset.end(); ++it) { + for(const auto& it : subset) { // the subset has the documentobject and the element name which belongs to it, // in our case for example the cube object and the "Edge1" string - if (it->first->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { + if (it.first->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { //we get the shape of the document object which resemble the whole box - Part::TopoShape ts = static_cast(it->first)->Shape.getShape(); + Part::TopoShape ts = static_cast(it.first)->Shape.getShape(); //we want only the subshape which is linked - for (const auto& jt: it->second) { + for (const auto& jt : it.second) { TopoDS_Shape sub = ts.getSubShape(jt.c_str()); builder.Add(sub); }