From 3e72a62aff0e382dcfe2828a08daf5d6c71a92e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 27 Oct 2022 12:47:30 +0200 Subject: [PATCH] operator* between enum and floating type is deprecated, fix warning Mirror 612d6772b93f9bdb0fad9213901d3f96c4736a08 --- .../CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index 6ea15ec5ad7..344774166cd 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -2091,6 +2091,7 @@ insert_balls(const Vertex_handle& vp, // n = 2(d-sq) / (sp+sq) // ======================= + const FT d_signF = static_cast(d_sign); int n = static_cast(std::floor(FT(2)*(d-sq) / (sp+sq))+.5); // if(minimal_weight_ != 0 && n == 0) return; @@ -2113,10 +2114,8 @@ insert_balls(const Vertex_handle& vp, curve_index, d_sign) << ")\n"; #endif - const FT sgn = (d_sign == CGAL::POSITIVE) ? 1. - : (d_sign == CGAL::NEGATIVE ? -1. : 0.); const Bare_point new_point = - domain_.construct_point_on_curve(vpp, curve_index, sgn * d / 2); + domain_.construct_point_on_curve(vpp, curve_index, d_signF * d / 2); const int dim = 1; // new_point is on edge const Index index = domain_.index_from_curve_index(curve_index); const FT point_weight = CGAL::square(size_(new_point, dim, index)); @@ -2162,7 +2161,6 @@ insert_balls(const Vertex_handle& vp, FT norm_step_size = dleft_frac * step_size; // Initial distance - FT d_signF = static_cast(d_sign); FT pt_dist = d_signF * norm_step_size; Vertex_handle prev = vp;