From e33377b5958647ab2ac1ba1e532d70ffa5a8286b Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Fri, 25 Apr 2025 23:44:53 +0530 Subject: [PATCH] Sketcher: Use const parameter where relevant --- src/Mod/Sketcher/App/Sketch.cpp | 6 +++--- src/Mod/Sketcher/App/Sketch.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 8d7f0dabf0..97d001c03d 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -4744,7 +4744,7 @@ int Sketch::internalSolve(std::string& solvername, int level) return ret; } -int Sketch::initMove(std::vector geoEltIds, bool fine) +int Sketch::initMove(const std::vector& geoEltIds, bool fine) { if (hasConflicts()) { // don't try to move sketches that contain conflicting constraints @@ -4769,7 +4769,7 @@ int Sketch::initMove(std::vector geoEltIds, bool fine) reserveSize += bsp.poles.size() * 2; } else { - reserveSize += 6; // 6 is the max case for all other cases. + reserveSize += 6; // 6 is the max for all other cases. } } MoveParameters.reserve(reserveSize); @@ -5072,7 +5072,7 @@ int Sketch::initBSplinePieceMove(int geoId, return 0; } -int Sketch::moveGeometries(std::vector geoEltIds, +int Sketch::moveGeometries(const std::vector& geoEltIds, Base::Vector3d toPoint, bool relative) { diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index 7095950298..71d86342c1 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -161,7 +161,7 @@ public: /** initializes a point (or curve) drag by setting the current * sketch status as a reference */ - int initMove(std::vector geoEltIds, bool fine = true); + int initMove(const std::vector& geoEltIds, bool fine = true); int initMove(int geoId, PointPos pos, bool fine = true); /** Initializes a B-spline piece drag by setting the current @@ -185,7 +185,7 @@ public: * a condition for satisfying the new point location! * The relative flag permits moving relatively to the current position */ - int moveGeometries(std::vector geoEltIds, + int moveGeometries(const std::vector& geoEltIds, Base::Vector3d toPoint, bool relative = false); int moveGeometry(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false);