diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Witness_complex/example/example_nearest_landmark_table.cpp | 2 | ||||
-rw-r--r-- | src/Witness_complex/include/gudhi/Witness_complex.h | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a71ad829..07992ba1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ else() # Turn off some VC++ warnings set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -fsanitize=address -fno-omit-frame-pointer") endif() if(CMAKE_BUILD_TYPE MATCHES Debug) diff --git a/src/Witness_complex/example/example_nearest_landmark_table.cpp b/src/Witness_complex/example/example_nearest_landmark_table.cpp index 65b675f9..b8594212 100644 --- a/src/Witness_complex/example/example_nearest_landmark_table.cpp +++ b/src/Witness_complex/example/example_nearest_landmark_table.cpp @@ -28,11 +28,9 @@ #include <iostream> #include <fstream> -#include <ctime> #include <utility> #include <string> #include <vector> -#include <list> int main(int argc, char * const argv[]) { using Nearest_landmark_range = std::vector<std::pair<std::size_t, double>>; diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index a79bf294..edd5c0a8 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -160,7 +160,7 @@ class Witness_complex { bool will_be_active = false; typename ActiveWitness::iterator l_it = curr_l; 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); if (sc.find(simplex) != sc.null_simplex()) { typename ActiveWitness::iterator next_it = l_it; |