From 8bf96394592020e720079df5ca06ae5716f124a7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 27 Sep 2024 10:43:27 +0100 Subject: [PATCH] Deal with the central predicate of periodic triangulations 2D, 3D --- .../include/CGAL/Periodic_2_Delaunay_triangulation_2.h | 6 ++---- .../include/CGAL/Periodic_2_triangulation_2.h | 6 ++---- .../include/CGAL/Periodic_3_Delaunay_triangulation_3.h | 3 +-- .../include/CGAL/Periodic_3_regular_triangulation_3.h | 3 +-- .../include/CGAL/Periodic_3_triangulation_3.h | 5 ++--- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index c83be87df905..ccbe1a44a2d9 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -5069,8 +5069,7 @@ side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, if (points[i] == &p0 && (o = orientation(p, p1, p2)) != COLLINEAR) return Oriented_side(o); } - CGAL_assertion(false); - return ON_NEGATIVE_SIDE; + CGAL_unreachable(); } template @@ -5113,8 +5112,7 @@ side_of_oriented_circle(const Point &p0, const Point &p1, const Point &p2, != COLLINEAR)) return Oriented_side(orient); } - CGAL_assertion(false); - return ON_NEGATIVE_SIDE; + CGAL_unreachable(); } template diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h index 2d2e3878f82a..519d1c27702f 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h @@ -3800,8 +3800,7 @@ Bounded_side Periodic_2_triangulation_2::side_of_face(const Point &q, default: { // impossible : cannot be on 3 edges for a real triangle - CGAL_assertion(false); - return ON_BOUNDARY; + CGAL_unreachable(); } } } @@ -3863,8 +3862,7 @@ Oriented_side Periodic_2_triangulation_2::oriented_side(Face_handle f, return ON_NEGATIVE_SIDE; } - CGAL_assertion(false); - return ON_NEGATIVE_SIDE; + CGAL_unreachable(); } template diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h index 24d15446e8dd..3d392a7e1763 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_Delaunay_triangulation_3.h @@ -1089,8 +1089,7 @@ _side_of_sphere(const Cell_handle& c, const Point& q, } } - CGAL_assertion(false); - return ON_UNBOUNDED_SIDE; + CGAL_unreachable(); } template < class Gt, class Tds > diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 4dba83f38470..6741d485eb40 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -751,8 +751,7 @@ class Periodic_3_regular_triangulation_3 } } - CGAL_assertion(false); - return ON_UNBOUNDED_SIDE; + CGAL_unreachable(); } Weighted_point construct_weighted_point(const Weighted_point& p, const Offset &o) const diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h index c1001de10c5c..1a0b19b0f88e 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h @@ -2415,7 +2415,7 @@ exact_periodic_locate break; default: // the point cannot lie on four facets - CGAL_assertion(false); + CGAL_unreachable(); } lo = off_query; @@ -2651,8 +2651,7 @@ inline Bounded_side Periodic_3_triangulation_3::side_of_cell( default: { // impossible : cannot be on 4 facets for a real tetrahedron - CGAL_assertion(false); - return ON_BOUNDARY; + CGAL_unreachable(); } } } // side_of_cell