From 153e98823767c42b11ef146bc5905fb896ed265f Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 21 Feb 2015 12:48:12 +0100 Subject: [PATCH] + make argument of multiFuse const reference --- src/Mod/Part/App/TopoShape.cpp | 6 +++--- src/Mod/Part/App/TopoShape.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 012e1301ce41..136e268947d7 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1331,7 +1331,7 @@ TopoDS_Shape TopoShape::fuse(TopoDS_Shape shape) const return mkFuse.Shape(); } -TopoDS_Shape TopoShape::multiFuse(std::vector shapes, Standard_Real tolerance) const +TopoDS_Shape TopoShape::multiFuse(const std::vector& shapes, Standard_Real tolerance) const { if (this->_Shape.IsNull()) Standard_Failure::Raise("Base shape is null"); @@ -1341,7 +1341,7 @@ TopoDS_Shape TopoShape::multiFuse(std::vector shapes, Standard_Rea TopoDS_Shape resShape = this->_Shape; if (resShape.IsNull()) throw Base::Exception("Object shape is null"); - for (std::vector::iterator it = shapes.begin(); it != shapes.end(); ++it) { + for (std::vector::const_iterator it = shapes.begin(); it != shapes.end(); ++it) { if (it->IsNull()) throw Base::Exception("Input shape is null"); // Let's call algorithm computing a fuse operation: @@ -1355,7 +1355,7 @@ TopoDS_Shape TopoShape::multiFuse(std::vector shapes, Standard_Rea BRepAlgoAPI_Fuse mkFuse; TopTools_ListOfShape shapeArguments,shapeTools; shapeArguments.Append(this->_Shape); - for (std::vector::iterator it = shapes.begin(); it != shapes.end(); ++it) { + for (std::vector::const_iterator it = shapes.begin(); it != shapes.end(); ++it) { if (it->IsNull()) throw Base::Exception("Tool shape is null"); if (tolerance > 0.0) diff --git a/src/Mod/Part/App/TopoShape.h b/src/Mod/Part/App/TopoShape.h index 145e02b06c18..17b339c2bb4a 100644 --- a/src/Mod/Part/App/TopoShape.h +++ b/src/Mod/Part/App/TopoShape.h @@ -146,7 +146,7 @@ class PartExport TopoShape : public Data::ComplexGeoData TopoDS_Shape cut(TopoDS_Shape) const; TopoDS_Shape common(TopoDS_Shape) const; TopoDS_Shape fuse(TopoDS_Shape) const; - TopoDS_Shape multiFuse(std::vector, Standard_Real tolerance = 0.0) const; + TopoDS_Shape multiFuse(const std::vector&, Standard_Real tolerance = 0.0) const; TopoDS_Shape oldFuse(TopoDS_Shape) const; TopoDS_Shape section(TopoDS_Shape) const; std::list slice(const Base::Vector3d&, double) const;