From 0ee68f66e3be71a0b94871d95658153e4130b68e Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 22 Feb 2021 07:19:06 +0100 Subject: [PATCH] Code proposition to avoid ifdef --- src/MEDLoader/MeshFormatReader.hxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/MEDLoader/MeshFormatReader.hxx b/src/MEDLoader/MeshFormatReader.hxx index 096de4a15..edba165d6 100644 --- a/src/MEDLoader/MeshFormatReader.hxx +++ b/src/MEDLoader/MeshFormatReader.hxx @@ -108,14 +108,9 @@ private: else { std::vector * tmpVec2 = aMap[removeFromFamily.first]; -#if !defined WIN32 && __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()) + auto itt2 = std::find(tmpVec2->cbegin(), tmpVec2->cend(), e); + if (itt2 != tmpVec2->cend()) tmpVec2->erase(itt2); if (!tmpVec2->size()) -- 2.39.2