From 504903976579eb055f7773ed18cc45d01576a234 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 9 Mar 2006 10:54:14 +0000 Subject: [PATCH] make IndexToShape() const --- src/SMESHDS/SMESHDS_Mesh.cxx | 2 +- src/SMESHDS/SMESHDS_Mesh.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.2