]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH/SMESH_Mesh.cxx
Salome HOME
#20282 EDF 22320 - general compute fails
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index 963d0f42dfc8449adda16b1b7752ae8476c44c87..b5a598f5725eafae43203519c2f58ad0fc24e31c 100644 (file)
@@ -2432,6 +2432,7 @@ bool SMESH_Mesh::SortByMeshOrder(std::vector<SMESH_subMesh*>& theListToSort) con
         smVec.push_back( sm );
         if ( sm->GetSubMeshDS() && sm->GetSubMeshDS()->IsComplexSubmesh() )
         {
+          smVec.reserve( smVec.size() + sm->GetSubMeshDS()->NbSubMeshes() );
           SMESHDS_SubMeshIteratorPtr smdsIt = sm->GetSubMeshDS()->GetSubMeshIterator();
           while ( smdsIt->more() )
           {