]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Avoid introducing dependency on OCCT
authoreap <eap@opencascade.com>
Thu, 11 Feb 2021 09:56:44 +0000 (12:56 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Tue, 16 Feb 2021 11:36:50 +0000 (14:36 +0300)
src/Basics/smIdType.hxx.in

index 28b184a3705480b1170d6023cc5f2fc375fe83d2..9f87b9fe66b784a148a85a7c03ed783714fcdebb 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <cinttypes>
 #include <limits>
-#include <NCollection_DataMap.hxx>
 
 #ifndef SALOME_USE_64BIT_IDS
 typedef std::int32_t smIdType;
@@ -37,12 +36,12 @@ typedef std::int64_t smIdType;
 
 struct smIdHasher
 {
-  static Standard_Integer HashCode(const smIdType theValue,  const Standard_Integer theUpperBound)
+  static int HashCode(const smIdType theValue,  const int theUpperBound)
   {
-    return IntegerHashCode(static_cast<Standard_Integer> (theValue), std::numeric_limits<smIdType>::max(), theUpperBound);
+    return static_cast<int> ((theValue & std::numeric_limits<smIdType>::max()) % theUpperBound + 1);
   }
 
-  static Standard_Boolean IsEqual( const smIdType& id1, const smIdType& id2 )
+  static bool IsEqual( const smIdType& id1, const smIdType& id2 )
   {
     return id1 == id2;
   }