From: rnv Date: Tue, 23 Feb 2021 14:25:18 +0000 (+0300) Subject: Compilation under CentOS 6 and 7 X-Git-Tag: V9_7_0a1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7fef2459b44;p=tools%2Fmedcoupling.git Compilation under CentOS 6 and 7 --- diff --git a/src/MEDLoader/MeshFormatReader.hxx b/src/MEDLoader/MeshFormatReader.hxx index edba165d6..9f55a46bd 100644 --- a/src/MEDLoader/MeshFormatReader.hxx +++ b/src/MEDLoader/MeshFormatReader.hxx @@ -107,17 +107,22 @@ private: if (itTmp == aMap.end()) return; else { - std::vector * 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 * tmpVec2 = aMap[removeFromFamily.first]; +#if __GNUC_PREREQ(4,9) + std::vector ::const_iterator itt2; +#else + std::vector ::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: