Sketcher: Use const parameter where relevant
This commit is contained in:
committed by
Benjamin Nauck
parent
b7d8ed25be
commit
e33377b595
@@ -4744,7 +4744,7 @@ int Sketch::internalSolve(std::string& solvername, int level)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Sketch::initMove(std::vector<GeoElementId> geoEltIds, bool fine)
|
||||
int Sketch::initMove(const std::vector<GeoElementId>& geoEltIds, bool fine)
|
||||
{
|
||||
if (hasConflicts()) {
|
||||
// don't try to move sketches that contain conflicting constraints
|
||||
@@ -4769,7 +4769,7 @@ int Sketch::initMove(std::vector<GeoElementId> 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<GeoElementId> geoEltIds,
|
||||
int Sketch::moveGeometries(const std::vector<GeoElementId>& geoEltIds,
|
||||
Base::Vector3d toPoint,
|
||||
bool relative)
|
||||
{
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
/** initializes a point (or curve) drag by setting the current
|
||||
* sketch status as a reference
|
||||
*/
|
||||
int initMove(std::vector<GeoElementId> geoEltIds, bool fine = true);
|
||||
int initMove(const std::vector<GeoElementId>& 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<GeoElementId> geoEltIds,
|
||||
int moveGeometries(const std::vector<GeoElementId>& geoEltIds,
|
||||
Base::Vector3d toPoint,
|
||||
bool relative = false);
|
||||
int moveGeometry(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false);
|
||||
|
||||
Reference in New Issue
Block a user