From: eap Date: Fri, 16 Sep 2011 07:36:50 +0000 (+0000) Subject: 0021314: [CEA 490] Driver GIBI with medloader / medcoupling X-Git-Tag: V6_main_FINAL~956 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da1200e68b58796fea513f2b56a786c2b63a9352;p=tools%2Fmedcoupling.git 0021314: [CEA 490] Driver GIBI with medloader / medcoupling fix resize of NodeContainer --- diff --git a/src/MEDLoader/SauvMedConvertor.hxx b/src/MEDLoader/SauvMedConvertor.hxx index a614778a9..b189e9216 100644 --- a/src/MEDLoader/SauvMedConvertor.hxx +++ b/src/MEDLoader/SauvMedConvertor.hxx @@ -208,9 +208,12 @@ namespace SauvUtilities const size_t pos = (nID-1) % chunkSize; if ( _nodes.size() < chunkID+1 ) { - _nodes.resize( chunkID+1 ); + std::vector< std::vector< Node > > newNodes(chunkID+1); for ( size_t i = 0; i < _nodes.size(); ++i ) - _nodes[i].resize( chunkSize ); + newNodes[i].swap( _nodes[i] ); + for ( size_t i = _nodes.size(); i < newNodes.size(); ++i ) + newNodes[i].resize( chunkSize ); + _nodes.swap( newNodes ); } return & _nodes[chunkID][pos]; }