diff --git a/src/Mod/Part/App/FeatureExtrusion.cpp b/src/Mod/Part/App/FeatureExtrusion.cpp index ae1645a945..f7d96f5a00 100644 --- a/src/Mod/Part/App/FeatureExtrusion.cpp +++ b/src/Mod/Part/App/FeatureExtrusion.cpp @@ -375,13 +375,11 @@ void Extrusion::makeDraft(const ExtrusionParameters& params, const TopoDS_Shape& // to store the sections for the loft std::list list_of_sections; - std::vector> extrusionSections; // we need for all found wires an offset copy of them // we store them in an array TopoDS_Wire offsetWire; - for (auto& wire : wiresections) - extrusionSections.push_back(std::vector()); + std::vector> extrusionSections(wiresections.size(), std::vector()); size_t rows = 0; int numEdges = 0; int numInnerWires = 0; @@ -606,8 +604,8 @@ void Extrusion::makeDraft(const ExtrusionParameters& params, const TopoDS_Shape& } } -void Extrusion::checkInnerWires (std::vector& isInnerWire, const ExtrusionParameters& params, - std::vector& checklist, bool forInner, std::vector prisms) +void Extrusion::checkInnerWires(std::vector& isInnerWire, const ExtrusionParameters& params, + std::vector& checklist, bool forInner, std::vector prisms) { GProp_GProps tempProperties; Standard_Real momentOfInertiaInitial; @@ -616,9 +614,7 @@ void Extrusion::checkInnerWires (std::vector& isInnerWire, const Extrusion std::vector::iterator isInnerWireIterator = isInnerWire.begin(); std::vector::iterator toCheckIterator = checklist.begin(); // create an array with false used later to store what can be cancelled from the checklist - std::vector toDisable; - for (auto numChecks : checklist) - toDisable.push_back(false); + std::vector toDisable(checklist.size(), false); int outer = -1; // we cut every prism to be checked from the other to be checked ones // if nothing happens, a prism can be cancelled from the checklist