From ea60fe8e63b7bb459cf80e2d5614e02b8590952e Mon Sep 17 00:00:00 2001 From: glisse Date: Thu, 30 Nov 2017 16:17:51 +0000 Subject: "This shall not happen": that's what assert is for. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/misc-glisse@3000 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 072f467bf3086b8e014c54c059f67dbd4f563ad7 --- src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Alpha_complex') diff --git a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp index d839ea19..f4a14ae3 100644 --- a/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp +++ b/src/Alpha_complex/utilities/alpha_complex_3d_persistence.cpp @@ -169,10 +169,9 @@ int main(int argc, char **argv) { std::cout << "filtration = " << filtr << std::endl; #endif // DEBUG_TRACES simplex_tree.insert_simplex(the_simplex, filtr); - if (the_alpha_value_iterator != the_alpha_values.end()) - ++the_alpha_value_iterator; - else - std::cout << "This shall not happen" << std::endl; + GUDHI_CHECK(the_alpha_value_iterator != the_alpha_values.end(), + "CGAL provided more simplices than values"); + ++the_alpha_value_iterator; } #ifdef DEBUG_TRACES -- cgit v1.2.3