summaryrefslogtreecommitdiff
path: root/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-10-17 18:55:35 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-10-17 18:55:35 +0000
commitb6c3298ce211935f65cc174cc86c0c6a5073035f (patch)
tree973b8631ba4fe49de0f6da77802adf9bcdb9532f /src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
parent01d0289237b3f72ed01f259b15d92eeaa4be1a59 (diff)
Simplify operator== for the boundary iterator.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/contiguous_vertices@862 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 48228705e9f310ed842e214c5d8849e8f1e0c670
Diffstat (limited to 'src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
index f77bac15..c5027f22 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
@@ -99,8 +99,7 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
// any end() iterator
explicit Simplex_tree_boundary_simplex_iterator(SimplexTree * st)
- : last_(st->null_vertex()),
- sib_(NULL) {
+ : sh_(st->null_simplex()) {
}
Simplex_tree_boundary_simplex_iterator(SimplexTree * st, Simplex_handle sh)
@@ -113,7 +112,7 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
if (sib_ != NULL) {
sh_ = sib_->find(next_);
} else {
- last_ = st->null_vertex();
+ sh_ = st->null_simplex();
} // vertex: == end()
}
@@ -121,16 +120,17 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
friend class boost::iterator_core_access;
// valid when iterating along the SAME boundary.
bool equal(Simplex_tree_boundary_simplex_iterator const& other) const {
- return (sib_ == other.sib_ && last_ == other.last_);
+ return sh_ == other.sh_;
}
Simplex_handle const& dereference() const {
+ assert(sh_ != st_->null_simplex());
return sh_;
}
void increment() {
if (sib_ == NULL) {
- last_ = st_->null_vertex();
+ sh_ = st_->null_simplex();
return;
}