Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
12e1afb
)
Fix porting error
author
jfa
<jfa@opencascade.com>
Wed, 21 Feb 2024 16:12:31 +0000
(16:12 +0000)
committer
cconopoima
<cesar.conopoima@gmail.com>
Mon, 26 Feb 2024 15:36:18 +0000
(15:36 +0000)
src/SMESHDS/SMESHDS_Mesh.hxx
patch
|
blob
|
history
diff --git
a/src/SMESHDS/SMESHDS_Mesh.hxx
b/src/SMESHDS/SMESHDS_Mesh.hxx
index f92fa5379569e5c1ecb972f0771c4b0d1899d5a2..1b8d2e2fd6d18a31c4d3cebc451969b2952d19df 100644
(file)
--- a/
src/SMESHDS/SMESHDS_Mesh.hxx
+++ b/
src/SMESHDS/SMESHDS_Mesh.hxx
@@
-61,10
+61,9
@@
class SMDS_BallElement;
#include <NCollection_DataMap.hxx>
typedef std::list<const SMESHDS_Hypothesis*> THypList;
#include <NCollection_DataMap.hxx>
typedef std::list<const SMESHDS_Hypothesis*> THypList;
-#if OCC_VERSION_LARGE < 0x07080000
-
struct SMESHDS_Hasher
{
struct SMESHDS_Hasher
{
+#if OCC_VERSION_LARGE < 0x07080000
static inline Standard_Boolean IsEqual(const TopoDS_Shape& S1,
const TopoDS_Shape& S2)
{
static inline Standard_Boolean IsEqual(const TopoDS_Shape& S1,
const TopoDS_Shape& S2)
{
@@
-75,14
+74,20
@@
struct SMESHDS_Hasher
{
return ::HashCode( S, Upper);
}
{
return ::HashCode( S, Upper);
}
-};
-typedef NCollection_DataMap< TopoDS_Shape, THypList, SMESHDS_Hasher > ShapeToHypothesis;
-
#else
#else
-
-typedef NCollection_DataMap< TopoDS_Shape, THypList > ShapeToHypothesis;
-
+ bool operator()(const TopoDS_Shape& S1, const TopoDS_Shape& S2) const
+ {
+ // for the purpose of ShapeToHypothesis map we don't consider shapes orientation
+ return S1.IsSame(S2);
+ }
+ size_t operator()(const TopoDS_Shape& S) const
+ {
+ return std::hash<TopoDS_Shape>{}(S);
+ }
#endif
#endif
+};
+
+typedef NCollection_DataMap< TopoDS_Shape, THypList, SMESHDS_Hasher > ShapeToHypothesis;
class SMESHDS_GroupBase;
class DownIdType;
class SMESHDS_GroupBase;
class DownIdType;