From b33bcf4bb496870b73ee6c4783777bf794e28fb7 Mon Sep 17 00:00:00 2001 From: skachano Date: Mon, 23 Mar 2015 19:16:09 +0000 Subject: Prevented a possible bug in witness_complex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/witness@501 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fa192bb3623622dde84686e8eaa36d2cc51db2c5 --- src/Witness_complex/include/gudhi/Witness_complex1.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Witness_complex/include/gudhi/Witness_complex1.h b/src/Witness_complex/include/gudhi/Witness_complex1.h index 911dcbe7..acb83647 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex1.h +++ b/src/Witness_complex/include/gudhi/Witness_complex1.h @@ -265,10 +265,10 @@ void witness_complex(KNearestNeighbours & knn) simplex_vector.push_back(knn[*it][i]); } returnValue = insert_simplex(simplex_vector,0.0); + it++ } else - active_w.erase(it); //First increase the iterator and then erase the previous element - it++; + active_w.erase(it++); //First increase the iterator and then erase the previous element } print_sc(root()); k++; -- cgit v1.2.3