From 95d11d45c63aec733b9f7c2614afc24e8031a047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 2 Oct 2023 16:12:48 +0200 Subject: [PATCH 1/2] fix warning with optimisers on --- .../internal/tetrahedral_remeshing_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 5814fc4fd289..0b5fb1615e0f 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -74,8 +74,8 @@ inline int indices(const int& i, const int& j) CGAL_assertion(i < 4 && j < 3); if(i < 4 && j < 3) return indices_table[i][j]; - else - return -1; + CGAL_assertion(!"invalid indices provided"); + return 0; } template From 33a1d336907fdd50e2eb48bace99143dc5f380c8 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 3 Oct 2023 14:37:01 +0200 Subject: [PATCH 2/2] use error msg --- .../internal/tetrahedral_remeshing_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 0b5fb1615e0f..06567f9dbe31 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -74,7 +74,7 @@ inline int indices(const int& i, const int& j) CGAL_assertion(i < 4 && j < 3); if(i < 4 && j < 3) return indices_table[i][j]; - CGAL_assertion(!"invalid indices provided"); + CGAL_error_msg("Invalid indices provided"); return 0; }