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();