fix bug end iterator++

This commit is contained in:
Paolo Cignoni 2006-02-28 12:13:49 +00:00
parent 40e4a353bd
commit baad6db4b9
1 changed files with 253 additions and 243 deletions

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.25 2005/11/10 15:37:58 cignoni
Removed flags clearing (now it should be in the constructor of face and vertex)
Revision 1.24 2005/10/13 09:32:11 cignoni
Re-inserted the cFFp and cVFp access. If only the const version of the member function exists, the compiler will call it
when a non-const object invokes that function
@ -164,7 +167,7 @@ public:
*/
static VertexIterator AddVertices(MeshType &m,int n, PointerUpdater<VertexPointer> &pu)
{
VertexIterator last=m.vert.end();
VertexIterator last;
pu.Clear();
if(m.vert.empty()) pu.oldBase=0; // if the vector is empty we cannot find the last valid element
else pu.oldBase=&*m.vert.begin();
@ -190,11 +193,18 @@ static VertexIterator AddVertices(MeshType &m,int n, PointerUpdater<VertexPointe
}
// e poiche' lo spazio e' cambiato si ricalcola anche last da zero
unsigned int siz=(unsigned int) m.vert.size()-n;
}
unsigned int siz=(unsigned int)m.vert.size()-n;
//if(last!=(VertexIterator)0)
//{
last = m.vert.begin();
advance(last,siz);
}
//}
//else last=m.vert.begin();
return last;// deve restituire l'iteratore alla prima faccia aggiunta;
}