Use constexpr ifs

This commit is contained in:
Mael Rouxel-Labbé 2025-03-19 16:37:47 +01:00
parent 3bb9146879
commit a0326e9b21
1 changed files with 2 additions and 2 deletions

View File

@ -103,14 +103,14 @@ CGAL::Image_3 convert_grid_to_image(const Grid& grid,
// select number type // select number type
WORD_KIND wordkind; WORD_KIND wordkind;
if(std::is_floating_point<FT>::value) // @fixme seems meaningless given that vx vy vz are doubles if constexpr(std::is_floating_point_v<FT>)
wordkind = WK_FLOAT; wordkind = WK_FLOAT;
else else
wordkind = WK_FIXED; wordkind = WK_FIXED;
// select signed or unsigned // select signed or unsigned
SIGN sign; SIGN sign;
if(std::is_signed<FT>::value) if constexpr(std::is_signed_v<FT>)
sign = SGN_SIGNED; sign = SGN_SIGNED;
else else
sign = SGN_UNSIGNED; sign = SGN_UNSIGNED;