From da1200e68b58796fea513f2b56a786c2b63a9352 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 16 Sep 2011 07:36:50 +0000 Subject: [PATCH] 0021314: [CEA 490] Driver GIBI with medloader / medcoupling fix resize of NodeContainer --- src/MEDLoader/SauvMedConvertor.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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]; } -- 2.39.2