]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Compilation under CentOS 6 and 7
authorrnv <rnv@opencascade.com>
Tue, 23 Feb 2021 14:25:18 +0000 (17:25 +0300)
committerrnv <rnv@opencascade.com>
Tue, 23 Feb 2021 14:25:18 +0000 (17:25 +0300)
src/MEDLoader/MeshFormatReader.hxx

index edba165d63ae67eddaafd0746bf112979f2789c0..9f55a46bddcf25dc88cc16e8948a611bd4778e7b 100644 (file)
@@ -107,17 +107,22 @@ private:
         if (itTmp == aMap.end()) return;
         else
         {
-            std::vector <MeshFormatElement>* tmpVec2 = aMap[removeFromFamily.first];
-            const MeshFormatElement e = removeFromFamily.second;
-            auto itt2 = std::find(tmpVec2->cbegin(), tmpVec2->cend(), e);
-            if (itt2 != tmpVec2->cend())
-                tmpVec2->erase(itt2);
-
-            if (!tmpVec2->size())
-            {
-                delete tmpVec2;
-                aMap.erase(removeFromFamily.first);
-            }
+         std::vector <MeshFormatElement>* tmpVec2 = aMap[removeFromFamily.first];
+#if __GNUC_PREREQ(4,9)
+         std::vector <MeshFormatElement>::const_iterator itt2;
+#else
+         std::vector <MeshFormatElement>::iterator itt2;
+#endif
+         const MeshFormatElement e = removeFromFamily.second;
+         itt2 = std::find(tmpVec2->begin(), tmpVec2->end(), e);
+         if (itt2 != tmpVec2->end())
+           tmpVec2->erase(itt2);
+         
+         if (!tmpVec2->size())
+           {
+             delete tmpVec2;
+             aMap.erase(removeFromFamily.first);
+           }
         }
     }
 public: