added an assertion to block the use of VEiterators in case of unitialized VEadjacency

This commit is contained in:
Paolo Cignoni 2012-02-09 17:54:25 +00:00
parent c8e202738c
commit 159f9d0c0f
1 changed files with 4 additions and 1 deletions

View File

@ -269,7 +269,10 @@ public:
VEIterator(EdgeType * _e, const int & _z){e = _e; z = _z;}
/// Constructor which takes a pointer to vertex
VEIterator(VertexType * _v){e = _v->VEp(); z = _v->VEi();}
VEIterator(VertexType * _v){
e = _v->VEp(); z = _v->VEi();
assert(z>=0 && "VE adjacency not initialized");
}
VFIEdgeType * &E() { return e;}
int & I() { return z;}