From 898382be0f20ce5caf69e5b7113d794af734a19c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 8 Apr 2022 13:27:52 +0200 Subject: [PATCH] Fix unused warning --- .../include/CGAL/Polygon_mesh_processing/distance.h | 7 ++----- 1 file changed, 2 insertions(+), 5 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 3a51a926118..88dc0c830e9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -1445,11 +1445,9 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, using Point_3 = typename Kernel::Point_3; using Triangle_3 = typename Kernel::Triangle_3; - const FT sq_error_bound = square(FT(error_bound)); - #ifdef CGAL_HAUSDORFF_DEBUG std::cout << " -- Bounded Hausdorff --" << std::endl; - std::cout << "error bound: " << error_bound << " (square: " << sq_error_bound << ")" << std::endl; + std::cout << "error bound: " << error_bound << std::endl; std::cout << "initial bound: " << sq_initial_bound << " (" << approximate_sqrt(sq_initial_bound) << ")" << std::endl; std::cout << "distance bound: " << sq_distance_bound << " (" << approximate_sqrt(sq_distance_bound) << ")" << std::endl; std::cout << "inf val: " << infinity_value << " (" << approximate_sqrt(infinity_value) << ")" << std::endl; @@ -1463,9 +1461,8 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, using Candidate = Candidate_triangle; - CGAL_precondition(sq_initial_bound >= sq_error_bound); + CGAL_precondition(sq_initial_bound >= square(FT(error_bound))); CGAL_precondition(sq_distance_bound != FT(0)); // value is -1 if unused - CGAL_precondition(sq_error_bound >= FT(0)); CGAL_precondition(tm1_tree.size() > 0); CGAL_precondition(tm2_tree.size() > 0);