diff --git a/src/spacewrapper.h b/src/spacewrapper.h index 0dcbb24..a55d95e 100644 --- a/src/spacewrapper.h +++ b/src/spacewrapper.h @@ -81,6 +81,14 @@ public: } } + void invalidate_iterators(size_t space_index_start) + { + for(size_t i = space_index_start ; i < indices.size() ; ++i) + { + indices[i] = std::numeric_limits::max(); + } + } + size_t get_space_iterator_value(size_t space_index) { if( space_index < indices.size() ) @@ -101,11 +109,7 @@ protected: void initialize_indices() { indices.resize(SPACE_INDICES_TABLE_SIZE); - - for(size_t & val : indices) - { - val = std::numeric_limits::max(); - } + invalidate_iterators(0); } };