소스 검색

Removed constexpr from functions that use union cast.

Branimir Karadžić 7 년 전
부모
커밋
ccc1d4d3f8
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  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;
 		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 };
 		union { float f; uint32_t ui; } u = { _a };
 		return u.ui;
 		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 };
 		union { uint32_t ui; float f; } u = { _a };
 		return u.f;
 		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 };
 		union { double f; uint64_t ui; } u = { _a };
 		return u.ui;
 		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 };
 		union { uint64_t ui; double f; } u = { _a };
 		return u.f;
 		return u.f;

+ 4 - 4
include/bx/math.h

@@ -68,19 +68,19 @@ namespace bx
 
 
 	/// Reinterprets the bit pattern of _a as uint32_t.
 	/// 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.
 	/// 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.
 	/// 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.
 	/// 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.
 	/// Returns sortable floating point value.
 	///
 	///