From 81e0f25754ed75bd4c6926482ec39b9a1ca33512 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 16 Oct 2006 08:49:29 +0000 Subject: [PATCH] Better managment of resize overloading when reducing the size of a vector --- vcg/simplex/faceplus/component_ocf.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vcg/simplex/faceplus/component_ocf.h b/vcg/simplex/faceplus/component_ocf.h index ce6dcfa3..b8427be4 100644 --- a/vcg/simplex/faceplus/component_ocf.h +++ b/vcg/simplex/faceplus/component_ocf.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.14 2006/10/09 20:20:55 cignoni +Added some missing Add***Ocf() for the default case. + Revision 1.13 2006/05/25 09:39:09 cignoni missing std and other gcc detected syntax errors @@ -152,9 +155,10 @@ public: { ThisTypeIterator oldbegin=(*this).begin(); ThisTypeIterator oldend=(*this).end(); + const unsigned int oldsize=(*this).size(); BaseType::resize(_size); if(oldbegin!=(*this).begin()) _updateOVP((*this).begin(),(*this).end()); - else _updateOVP(oldend, (*this).end()); + else if(oldsize<_size) _updateOVP(oldend, (*this).end()); if (ColorEnabled) CV.resize(_size); if (MarkEnabled) MV.resize(_size);