From: ageay Date: Wed, 19 Jun 2013 05:55:08 +0000 (+0000) Subject: Optimize memory needs on pushBackSilent X-Git-Tag: V6_7_0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1948906d221e56df8ad15fc2bcbb449c9fe442d7;p=tools%2Fmedcoupling.git Optimize memory needs on pushBackSilent --- diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 39030643d..71be0a297 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -101,7 +101,7 @@ namespace ParaMEDMEM T *pointer=_pointer.getPointer(); while(first!=last) { - if(_nb_of_elem>=_nb_of_elem_alloc || _nb_of_elem==0) + if(_nb_of_elem>=_nb_of_elem_alloc) { reserve(_nb_of_elem_alloc>0?2*_nb_of_elem_alloc:1); pointer=_pointer.getPointer();