X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_DataMapOfShape.hxx;h=21bb5a1e53a3dc5879e28e594a47ea78a212825c;hp=5b8165cf1d1411b231a876af8a9ea5619497c5d0;hb=1821a9c35f90be93d3d55b1e1db9114902eaf6f8;hpb=bd8f1aee7c78f7d2eb82bd4fec5e08c9e3d280ce diff --git a/src/SMESHDS/SMESHDS_DataMapOfShape.hxx b/src/SMESHDS/SMESHDS_DataMapOfShape.hxx index 5b8165cf1..21bb5a1e5 100755 --- a/src/SMESHDS/SMESHDS_DataMapOfShape.hxx +++ b/src/SMESHDS/SMESHDS_DataMapOfShape.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -32,13 +32,19 @@ /* * This method needed for instance NCollection_DataMap with TopoDS_Shape as key */ - -inline Standard_Boolean IsEqual(const TopoDS_Shape& S1, - const TopoDS_Shape& S2) +struct SMESHDS_Hasher { - return S1.IsSame(S2); -} - + static inline Standard_Boolean IsEqual(const TopoDS_Shape& S1, + const TopoDS_Shape& S2) + { + return S1.IsSame(S2); + } + static inline Standard_Integer HashCode(const TopoDS_Shape& S, + const Standard_Integer Upper) + { + return ::HashCode( S, Upper); + } +}; -#endif +#endif