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=refs%2Fheads%2Fjfa%2FPorting_OCCT_780;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 6950ed1bd..b791360b6 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)