From 30e0a5d0212b21c893cdfcdc3eccb6e46cf8eee5 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 5 Apr 2022 16:43:29 +0200 Subject: [PATCH] Restore consistency between bounds and candidates queue --- .../include/CGAL/Polygon_mesh_processing/distance.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index e09a7299f9f..552587f0f29 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -1712,14 +1712,10 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, // which can go down, so it is only recomputed once splitting is finished, // using the top value of the PQ - // Add the subtriangle to the candidate list if it is meaningful - if(sub_triangle_bounds.upper >= global_bounds.lower) - candidate_triangles.emplace(sub_triangles[i], sub_triangle_bounds, triangle_and_bounds.tm1_face); + candidate_triangles.emplace(sub_triangles[i], sub_triangle_bounds, triangle_and_bounds.tm1_face); } - // In case all subdividing triangles of the last queue entry are useless - if(candidate_triangles.empty()) - break; + CGAL_assertion(!candidate_triangles.empty()); // Update global upper Hausdorff bound after subdivision. const Candidate& top_candidate = candidate_triangles.top();