summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h
diff options
context:
space:
mode:
authorskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-06 10:25:27 +0000
committerskachano <skachano@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-06 10:25:27 +0000
commitae96c8bbacc9c54e69c1a4bdf70e03dbde2ec48c (patch)
tree6eb3eed3e85707e77ea083267219d9b271804f55 /src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h
parent6a1455578219460b9a15c58f47520d203682f9d8 (diff)
Added assert
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@1824 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fdf5f7fecd75007929b9f5d817f186851aac4542
Diffstat (limited to 'src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h')
-rw-r--r--src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h
index dd1501c3..6853faa6 100644
--- a/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h
+++ b/src/Witness_complex/include/gudhi/Active_witness/Active_witness_iterator.h
@@ -81,14 +81,8 @@ private :
void increment()
{
- // if neighbor search is at its end, check if lh_++ is end
- if (aw_->iterator_last_ == aw_->iterator_end_) {
- if (lh_++ == aw_->nearest_landmark_table_.end()) {
- is_end_ = true;
- return;
- }
- return;
- }
+ // the neighbor search can't be at the end iterator of a list
+ assert(!is_end_ && lh_ != aw_->nearest_landmark_table_.end());
// if the id of the current landmark is the same as the last one
if (lh_->first == aw_->iterator_last_->first) {
// if the next iterator is end, lh_it = end pointer