瀏覽代碼

Removed constexpr from functions that use union cast.

Branimir Karadžić 7 年之前
父節點
當前提交
b2acef05fd
共有 2 個文件被更改,包括 12 次插入12 次删除
  1. 6 6
      include/bx/inline/math.inl
  2. 6 6
      include/bx/math.h

+ 6 - 6
include/bx/inline/math.inl

@@ -59,37 +59,37 @@ namespace bx
 		return result;
 	}
 
-	inline constexpr BX_CONST_FUNC bool isNan(float _f)
+	inline BX_CONST_FUNC bool isNan(float _f)
 	{
 		const uint32_t tmp = floatToBits(_f) & INT32_MAX;
 		return tmp > UINT32_C(0x7f800000);
 	}
 
-	inline constexpr BX_CONST_FUNC bool isNan(double _f)
+	inline BX_CONST_FUNC bool isNan(double _f)
 	{
 		const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
 		return tmp > UINT64_C(0x7ff0000000000000);
 	}
 
-	inline constexpr BX_CONST_FUNC bool isFinite(float _f)
+	inline BX_CONST_FUNC bool isFinite(float _f)
 	{
 		const uint32_t tmp = floatToBits(_f) & INT32_MAX;
 		return tmp < UINT32_C(0x7f800000);
 	}
 
-	inline constexpr BX_CONST_FUNC bool isFinite(double _f)
+	inline BX_CONST_FUNC bool isFinite(double _f)
 	{
 		const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
 		return tmp < UINT64_C(0x7ff0000000000000);
 	}
 
-	inline constexpr BX_CONST_FUNC bool isInfinite(float _f)
+	inline BX_CONST_FUNC bool isInfinite(float _f)
 	{
 		const uint32_t tmp = floatToBits(_f) & INT32_MAX;
 		return tmp == UINT32_C(0x7f800000);
 	}
 
-	inline constexpr BX_CONST_FUNC bool isInfinite(double _f)
+	inline BX_CONST_FUNC bool isInfinite(double _f)
 	{
 		const uint64_t tmp = doubleToBits(_f) & INT64_MAX;
 		return tmp == UINT64_C(0x7ff0000000000000);

+ 6 - 6
include/bx/math.h

@@ -88,27 +88,27 @@ namespace bx
 
 	/// Returns true if _f is a number that is NaN.
 	///
-	constexpr BX_CONST_FUNC bool isNan(float _f);
+	BX_CONST_FUNC bool isNan(float _f);
 
 	/// Returns true if _f is a number that is NaN.
 	///
-	constexpr BX_CONST_FUNC bool isNan(double _f);
+	BX_CONST_FUNC bool isNan(double _f);
 
 	/// Returns true if _f is not infinite and is not a NaN.
 	///
-	constexpr BX_CONST_FUNC bool isFinite(float _f);
+	BX_CONST_FUNC bool isFinite(float _f);
 
 	/// Returns true if _f is not infinite and is not a NaN.
 	///
-	constexpr BX_CONST_FUNC bool isFinite(double _f);
+	BX_CONST_FUNC bool isFinite(double _f);
 
 	/// Returns true if _f is infinite and is not a NaN.
 	///
-	constexpr BX_CONST_FUNC bool isInfinite(float _f);
+	BX_CONST_FUNC bool isInfinite(float _f);
 
 	/// Returns true if _f is infinite and is not a NaN.
 	///
-	constexpr BX_CONST_FUNC bool isInfinite(double _f);
+	BX_CONST_FUNC bool isInfinite(double _f);
 
 	/// Returns the largest integer value not greater than _f.
 	///