mirror of https://github.com/CGAL/cgal
Use constexpr ifs
This commit is contained in:
parent
3bb9146879
commit
a0326e9b21
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue