diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp
index 77e1884160..1899898099 100644
--- a/src/Mod/Path/App/Area.cpp
+++ b/src/Mod/Path/App/Area.cpp
@@ -210,7 +210,7 @@ Area::Area(const Area& other, bool deep_copy)
myShape = other.myShape;
myShapeDone = other.myShapeDone;
mySections.reserve(other.mySections.size());
- for (shared_ptr area : other.mySections)
+ for (const shared_ptr& area : other.mySections)
mySections.push_back(make_shared(*area, true));
}
diff --git a/src/Mod/Path/libarea/Adaptive.cpp b/src/Mod/Path/libarea/Adaptive.cpp
index b46284572f..070b9cd3de 100644
--- a/src/Mod/Path/libarea/Adaptive.cpp
+++ b/src/Mod/Path/libarea/Adaptive.cpp
@@ -1794,7 +1794,7 @@ std::list Adaptive2d::Execute(const DPaths &stockPaths, const DP
if (opType == OperationType::otClearingOutside)
{
// add stock paths, with overshooting
- for (auto p : stockOvershoot)
+ for (const auto& p : stockOvershoot)
inputPaths.push_back(p);
}
else if (opType == OperationType::otClearingInside)
@@ -2639,7 +2639,7 @@ void Adaptive2d::ProcessPolyNode(Paths boundPaths, Paths toolBoundPaths)
clipof.Execute(outsideEngage, toolRadiusScaled - stepOverFactor * toolRadiusScaled);
CleanPolygons(outsideEngage);
ReversePaths(outsideEngage);
- for (auto p : outsideEngage)
+ for (const auto& p : outsideEngage)
engageBounds.push_back(p);
outsideEntry = true;
}
diff --git a/src/Mod/Path/libarea/AreaOrderer.cpp b/src/Mod/Path/libarea/AreaOrderer.cpp
index 46ac425606..8d1d47e6e7 100644
--- a/src/Mod/Path/libarea/AreaOrderer.cpp
+++ b/src/Mod/Path/libarea/AreaOrderer.cpp
@@ -77,14 +77,14 @@ void CInnerCurves::Insert(shared_ptr pcurve)
shared_ptr new_item(new CInnerCurves(shared_from_this(), pcurve));
this->m_inner_curves.insert(new_item);
- for(shared_ptr c : outside_of_these) {
+ for(const shared_ptr& c : outside_of_these) {
// move items
c->m_pOuter = new_item;
new_item->m_inner_curves.insert(c);
this->m_inner_curves.erase(c);
}
- for(shared_ptr c : crossing_these) {
+ for(const shared_ptr& c : crossing_these) {
// unite these
new_item->Unite(c);
this->m_inner_curves.erase(c);