From f87cb454ed31f7fc91b35405a180dd429d607257 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 11 Feb 2021 12:56:44 +0300 Subject: [PATCH] Avoid introducing dependency on OCCT --- src/Basics/smIdType.hxx.in | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; } -- 2.39.2