From 1948906d221e56df8ad15fc2bcbb449c9fe442d7 Mon Sep 17 00:00:00 2001 From: ageay Date: Wed, 19 Jun 2013 05:55:08 +0000 Subject: [PATCH] Optimize memory needs on pushBackSilent --- src/MEDCoupling/MEDCouplingMemArray.txx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.39.2