From: eap Date: Thu, 11 Feb 2021 09:56:44 +0000 (+0300) Subject: Avoid introducing dependency on OCCT X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f87cb454ed31f7fc91b35405a180dd429d607257;p=modules%2Fkernel.git Avoid introducing dependency on OCCT --- diff --git a/src/Basics/smIdType.hxx.in b/src/Basics/smIdType.hxx.in index 28b184a37..9f87b9fe6 100644 --- a/src/Basics/smIdType.hxx.in +++ b/src/Basics/smIdType.hxx.in @@ -27,7 +27,6 @@ #include #include -#include #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 (theValue), std::numeric_limits::max(), theUpperBound); + return static_cast ((theValue & std::numeric_limits::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; }