summaryrefslogtreecommitdiff
path: root/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
diff options
context:
space:
mode:
authorGard Spreemann <gspreemann@gmail.com>2018-06-15 12:34:03 +0200
committerGard Spreemann <gspreemann@gmail.com>2018-06-15 12:34:03 +0200
commit41482b4260b4aff3d6803e340d5c94fbefb9af67 (patch)
tree89eae43dcb3fd4ab040e96f3d5479427d8cd2c7f /include/gudhi/Simplex_tree/Simplex_tree_iterators.h
parent41a1b8c2728e212c832c0384c8bb424139a247cf (diff)
parentc524232f734de875d69e2f190f01a6c976024368 (diff)
Merge branch 'upstream/latest' into dfsg/latest
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: