Przeglądaj źródła

Removed constexpr from functions that use union cast.

Branimir Karadžić 7 lat temu
rodzic
commit
ccc1d4d3f8
2 zmienionych plików z 8 dodań i 8 usunięć
  1. 4 4
      include/bx/inline/math.inl
  2. 4 4
      include/bx/math.h

+ 4 - 4
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;

+ 4 - 4
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.
 	///