From 757cc8525d34b1fc5ea5f6c18fb651a3d89e9f0f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 25 Sep 2025 16:36:37 +0200 Subject: [PATCH] fix a warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` warning: array subscript 5 is outside array bounds of ‘std::array*, 3> [1]’ [-Warray-bounds=] ``` --- .../CGAL/Conforming_constrained_Delaunay_triangulation_3.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h index 61c398d6448..241f0e0eb30 100644 --- a/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h +++ b/Constrained_triangulation_3/include/CGAL/Conforming_constrained_Delaunay_triangulation_3.h @@ -190,8 +190,10 @@ does_first_triangle_intersect_second_triangle_interior(const typename K::Triangl auto comp = k.compare_xyz_3_object(); auto sort_ptrs = [&comp](const Point_3* p1, const Point_3* p2) { return comp(*p1, *p2) == SMALLER; }; auto intersection_is_a_vertex_or_a_common_edge = [&]() { + CGAL_assume(nb_of_t1_vertices_in_the_line >= 0 && nb_of_t1_vertices_in_the_line <= 3); std::sort(t1_vertices_in_the_line.data(), t1_vertices_in_the_line.data() + nb_of_t1_vertices_in_the_line, sort_ptrs); + CGAL_assume(nb_of_t2_vertices_in_the_line >= 0 && nb_of_t2_vertices_in_the_line <= 3); std::sort(t2_vertices_in_the_line.data(), t2_vertices_in_the_line.data() + nb_of_t2_vertices_in_the_line, sort_ptrs); std::size_t nb_of_common_vertices = 0;