From 24024424efef47a0b5ffc26a8fd72d5f25470ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 2 Oct 2025 15:09:48 +0200 Subject: [PATCH] use constexpr --- BGL/include/CGAL/boost/graph/IO/PLY.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/IO/PLY.h b/BGL/include/CGAL/boost/graph/IO/PLY.h index f44128e8d9c..ca773333875 100644 --- a/BGL/include/CGAL/boost/graph/IO/PLY.h +++ b/BGL/include/CGAL/boost/graph/IO/PLY.h @@ -370,11 +370,8 @@ bool write_PLY(std::ostream& os, bool has_vcolor = !is_default_parameter::value; bool has_fcolor = !is_default_parameter::value; - bool has_vnormal = false; - if constexpr (!parameters::is_default_parameter::value) - { - has_vnormal = true; - } + constexpr bool has_vnormal = (!parameters::is_default_parameter::value); + VIMap vim = CGAL::get_initialized_vertex_index_map(g, np); Vpm vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(boost::vertex_point, g)); @@ -412,7 +409,7 @@ bool write_PLY(std::ostream& os, << "property uchar alpha" << std::endl; } - if(has_vnormal) + if constexpr (has_vnormal) { auto vnm = get_parameter(np, internal_np::vertex_normal_map); typedef decltype(vnm) Normal_map;