Fixes GCC8 FTBFS due to included copy of SMESH.
authorKurt Kremitzki <kurt@kwk.systems>
Sat, 2 Mar 2019 09:42:57 +0000 (03:42 -0600)
committerKurt Kremitzki <kurt@kwk.systems>
Sat, 2 Mar 2019 09:42:57 +0000 (03:42 -0600)
Last-Updated: 2018-08-10

Gbp-Pq: Name fix_gcc8_ftbfs.patch

src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx

index 14a6d9a763f01465f57d32a3c6118d91ad9840cd..f81f572ff7c05f679ae8a250c86668420164c908 100644 (file)
@@ -216,8 +216,8 @@ struct TIDTypeCompare {
 // WARNING: this comparator makes impossible to store both nodes and elements in the same set
 // because there are nodes and elements with the same ID. Use TIDTypeCompare for such containers.
 struct TIDCompare {
-  bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
-  { return e1->GetID() < e2->GetID(); }
+  template<typename T> bool operator () (const T* e1, const T* e2) const
+  { return static_cast<const SMDS_MeshElement*>(e1)->GetID() < static_cast<const SMDS_MeshElement*>(e2)->GetID(); }
 };
 
 #endif