From: jfa Date: Mon, 15 Jan 2024 13:31:55 +0000 (+0000) Subject: Porting to OCCT 7.8.0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c388157590cfb6b0547b32a0a840764d7ab46c8;p=modules%2Fkernel.git Porting to OCCT 7.8.0 --- diff --git a/src/Basics/smIdType.hxx.in b/src/Basics/smIdType.hxx.in index 4ad268d72..d1b3e9e61 100644 --- a/src/Basics/smIdType.hxx.in +++ b/src/Basics/smIdType.hxx.in @@ -25,7 +25,10 @@ #cmakedefine SALOME_USE_64BIT_IDS +#include "Basics_OCCTVersion.hxx" + #include +#include #include #ifndef SALOME_USE_64BIT_IDS @@ -36,6 +39,7 @@ typedef std::int64_t smIdType; struct smIdHasher { +#if OCC_VERSION_LARGE < 0x07080000 static int HashCode(const smIdType theValue, const int theUpperBound) { return static_cast ((theValue & std::numeric_limits::max()) % theUpperBound + 1); @@ -45,6 +49,16 @@ struct smIdHasher { return id1 == id2; } +#else + size_t operator()(const smIdType theValue) const + { + return static_cast (theValue & std::numeric_limits::max()); + } + bool operator()(const smIdType& theValue1, const smIdType& theValue2) const + { + return theValue1 == theValue2; + } +#endif }; template inline smIdType ToSmIdType(T val)