mirror of https://github.com/CGAL/cgal
use constexpr
This commit is contained in:
parent
39531baac8
commit
24024424ef
|
|
@ -370,11 +370,8 @@ bool write_PLY(std::ostream& os,
|
|||
|
||||
bool has_vcolor = !is_default_parameter<CGAL_NP_CLASS, internal_np::vertex_color_map_t>::value;
|
||||
bool has_fcolor = !is_default_parameter<CGAL_NP_CLASS, internal_np::face_color_map_t>::value;
|
||||
bool has_vnormal = false;
|
||||
if constexpr (!parameters::is_default_parameter<CGAL_NP_CLASS, internal_np::vertex_normal_map_t>::value)
|
||||
{
|
||||
has_vnormal = true;
|
||||
}
|
||||
constexpr bool has_vnormal = (!parameters::is_default_parameter<CGAL_NP_CLASS, internal_np::vertex_normal_map_t>::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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue