From: eap Date: Thu, 9 Mar 2006 10:54:14 +0000 (+0000) Subject: make IndexToShape() const X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=504903976579eb055f7773ed18cc45d01576a234;p=modules%2Fsmesh.git make IndexToShape() const --- diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index 15c1fe44a..dc048b281 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -1108,7 +1108,7 @@ int SMESHDS_Mesh::AddCompoundSubmesh(const TopoDS_Shape& S, //function : IndexToShape //purpose : //======================================================================= -TopoDS_Shape SMESHDS_Mesh::IndexToShape(int ShapeIndex) +const TopoDS_Shape& SMESHDS_Mesh::IndexToShape(int ShapeIndex) const { return myIndexToShape.FindKey(ShapeIndex); } diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index fd79529f8..b5aca3833 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -432,7 +432,7 @@ public: SMESHDS_Script * GetScript(); void ClearScript(); int ShapeToIndex(const TopoDS_Shape & aShape) const; - TopoDS_Shape IndexToShape(int ShapeIndex); + const TopoDS_Shape& IndexToShape(int ShapeIndex) const; SMESHDS_SubMesh * NewSubMesh(int Index); int AddCompoundSubmesh(const TopoDS_Shape& S, TopAbs_ShapeEnum type = TopAbs_SHAPE);