Restore consistency between bounds and candidates queue

This commit is contained in:
Mael 2022-04-05 16:43:29 +02:00 committed by GitHub
parent 6fcc5f64a5
commit 30e0a5d021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

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