From: jfa Date: Mon, 15 Jan 2024 14:28:30 +0000 (+0000) Subject: Porting to OCCT 7.8.0 X-Git-Tag: V9_13_0a1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f6c14bfc3cc7794665985caf9e6cd492757eb08;p=plugins%2Fnetgenplugin.git Porting to OCCT 7.8.0 --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index efa5e70..02d4332 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -154,16 +154,27 @@ namespace { return (( Contains( other.n1 ) || Contains( other.n2 )) && ( this != &other )); } +#if OCC_VERSION_LARGE < 0x07080000 static int HashCode(const Link& aLink, int aLimit) { return ::HashCode(aLink.n1 + aLink.n2, aLimit); } - static Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2) { return (( aLink1.n1 == aLink2.n1 && aLink1.n2 == aLink2.n2 ) || ( aLink1.n1 == aLink2.n2 && aLink1.n2 == aLink2.n1 )); } +#else + size_t operator()(const Link& aLink) const + { + return static_cast(aLink.n1 + aLink.n2); + } + bool operator()(const Link& aLink1, const Link& aLink2) const + { + return (( aLink1.n1 == aLink2.n1 && aLink1.n2 == aLink2.n2 ) || + ( aLink1.n1 == aLink2.n2 && aLink1.n2 == aLink2.n1 )); + } +#endif }; typedef NCollection_Map TLinkMap;