diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-02 14:24:15 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-02 14:24:15 +0000 |
commit | 02a173f88eb4c4f5bd373db93ba546326307dd7c (patch) | |
tree | 4476e409fe84c6b3a61a09f83f2085601521611d | |
parent | 5b2ac6a04b3b0f03570e5d00a94d8e1871d36a95 (diff) |
test if !end before accessing operator
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/relaxed-witness@2130 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 82e8b58b1452f45668bd7511d528db96c3613c53
-rw-r--r-- | src/Witness_complex/include/gudhi/Witness_complex.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index edd5c0a8..e7adf80f 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -179,7 +179,7 @@ class Witness_complex { norelax_dist2 = l_it->second; } } else if (dim == 0) { - for (; l_it->second - alpha2 <= norelax_dist2 && l_it != end; ++l_it) { + for (;l_it != end && l_it->second - alpha2 <= norelax_dist2; ++l_it) { simplex.push_back(l_it->first); double filtration_value = 0; // if norelax_dist is infinite, relaxation is 0. |