From: Anthony Geay Date: Mon, 2 Aug 2021 09:59:37 +0000 (+0200) Subject: [EDF23738] : bug correction to avoid regressions X-Git-Tag: V9_8_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a76246f5a3aeb3e735a40d1b90575630fb7bb564;p=tools%2Fmedcoupling.git [EDF23738] : bug correction to avoid regressions --- diff --git a/src/MEDLoader/MEDFileField.cxx b/src/MEDLoader/MEDFileField.cxx index 17b42cf44..df12e7be8 100644 --- a/src/MEDLoader/MEDFileField.cxx +++ b/src/MEDLoader/MEDFileField.cxx @@ -1092,7 +1092,12 @@ void MEDFileFields::aggregateFieldsOnSameMeshes(MEDFileMeshes *ms) { if(!ms) THROW_IK_EXCEPTION("MEDFileFields::aggregateFieldsOnSameMeshes : ms is nullptr !"); - MCAuto mfs(MEDFileFields::New()); + // + std::vector msNames(ms->getMeshesNames()); + std::set msNamesSet(msNames.begin(),msNames.end()); + if(msNames.size() == msNamesSet.size()) + return ; + // std::map> > fsByName; for(auto fmts : _fields) { @@ -1186,7 +1191,7 @@ void MEDFileFields::aggregateFieldsOnSameMeshes(MEDFileMeshes *ms) gg->setCoords(coo); otherMeshes.push_back(DynamicCast(gg)); } - // + // until this point nothing has changed in \a this nor in \a ms as if a const method. ms->resize(0); for(auto mesh : otherMeshes) ms->pushMesh(mesh);