don't return invalid iterators for empty element ranges

This commit is contained in:
Janis Born
2018-03-22 14:56:35 +01:00
parent 4c23effb91
commit f5bc55004a

View File

@@ -109,9 +109,6 @@ class GenericIteratorT {
: mesh_(&_mesh), hnd_(_hnd), skip_bits_(0) : mesh_(&_mesh), hnd_(_hnd), skip_bits_(0)
{ {
if (_skip) enable_skipping(); if (_skip) enable_skipping();
// Set vertex handle invalid if the mesh contains no vertex
if((mesh_->*PrimitiveCountMember)() == 0) hnd_ = value_handle(-1);
} }
/// Standard dereferencing operator. /// Standard dereferencing operator.