Fixes GCC8 FTBFS due to included copy of SMESH.
authorKurt Kremitzki <kurt@kwk.systems>
Tue, 28 Feb 2023 01:17:57 +0000 (01:17 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 28 Feb 2023 01:17:57 +0000 (01:17 +0000)
Last-Updated: 2018-08-10

Gbp-Pq: Name fix_gcc8_ftbfs.patch

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

index ca561328575c6c802151769f75e1a50435cdbf21..d97a37bc51b8cfe2cec68ed968c6f51c10daac15 100644 (file)
@@ -221,8 +221,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