summaryrefslogtreecommitdiff
path: root/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gudhi/Simplex_tree/Simplex_tree_iterators.h')
-rw-r--r--include/gudhi/Simplex_tree/Simplex_tree_iterators.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
index ab7346d4..02c8bb64 100644
--- a/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
+++ b/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
@@ -4,7 +4,7 @@
*
* Author(s): Clément Maria
*
- * Copyright (C) 2014 INRIA Sophia Antipolis-Méditerranée (France)
+ * Copyright (C) 2014 Inria
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -101,7 +101,9 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
// any end() iterator
explicit Simplex_tree_boundary_simplex_iterator(SimplexTree * st)
- : sib_(nullptr),
+ : last_(st->null_vertex()),
+ next_(st->null_vertex()),
+ sib_(nullptr),
sh_(st->null_simplex()),
st_(st) {
}
@@ -109,7 +111,9 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
template<class SimplexHandle>
Simplex_tree_boundary_simplex_iterator(SimplexTree * st, SimplexHandle sh)
: last_(sh->first),
+ next_(st->null_vertex()),
sib_(nullptr),
+ sh_(st->null_simplex()),
st_(st) {
// Only check once at the beginning instead of for every increment, as this is expensive.
if (SimplexTree::Options::contiguous_vertices)
@@ -123,9 +127,7 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
sh_ = sib_->members_.begin()+next_;
else
sh_ = sib_->find(next_);
- } else {
- sh_ = st->null_simplex();
- } // vertex: == end()
+ }
}
private: