From ccc1d4d3f88e1ebc3191d295de1cbb8d7fb87e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 26 Nov 2018 09:07:39 -0800 Subject: [PATCH] Removed constexpr from functions that use union cast. --- include/bx/inline/math.inl | 8 ++++---- include/bx/math.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/bx/inline/math.inl b/include/bx/inline/math.inl index de63e4e..774bb14 100644 --- a/include/bx/inline/math.inl +++ b/include/bx/inline/math.inl @@ -23,25 +23,25 @@ namespace bx return _rad * 180.0f / kPi; } - inline constexpr BX_CONST_FUNC uint32_t floatToBits(float _a) + inline BX_CONST_FUNC uint32_t floatToBits(float _a) { union { float f; uint32_t ui; } u = { _a }; return u.ui; } - inline constexpr BX_CONST_FUNC float bitsToFloat(uint32_t _a) + inline BX_CONST_FUNC float bitsToFloat(uint32_t _a) { union { uint32_t ui; float f; } u = { _a }; return u.f; } - inline constexpr BX_CONST_FUNC uint64_t doubleToBits(double _a) + inline BX_CONST_FUNC uint64_t doubleToBits(double _a) { union { double f; uint64_t ui; } u = { _a }; return u.ui; } - inline constexpr BX_CONST_FUNC double bitsToDouble(uint64_t _a) + inline BX_CONST_FUNC double bitsToDouble(uint64_t _a) { union { uint64_t ui; double f; } u = { _a }; return u.f; diff --git a/include/bx/math.h b/include/bx/math.h index 523cac7..ddcbb2d 100644 --- a/include/bx/math.h +++ b/include/bx/math.h @@ -68,19 +68,19 @@ namespace bx /// Reinterprets the bit pattern of _a as uint32_t. /// - constexpr BX_CONST_FUNC uint32_t floatToBits(float _a); + BX_CONST_FUNC uint32_t floatToBits(float _a); /// Reinterprets the bit pattern of _a as float. /// - constexpr BX_CONST_FUNC float bitsToFloat(uint32_t _a); + BX_CONST_FUNC float bitsToFloat(uint32_t _a); /// Reinterprets the bit pattern of _a as uint64_t. /// - constexpr BX_CONST_FUNC uint64_t doubleToBits(double _a); + BX_CONST_FUNC uint64_t doubleToBits(double _a); /// Reinterprets the bit pattern of _a as double. /// - constexpr BX_CONST_FUNC double bitsToDouble(uint64_t _a); + BX_CONST_FUNC double bitsToDouble(uint64_t _a); /// Returns sortable floating point value. ///