Browse Source

Fixed clang warning

Christophe Riccio 7 years ago
parent
commit
e1f44ea397
1 changed files with 4 additions and 4 deletions
  1. 4 4
      test/ext/ext_scalar_common.cpp

+ 4 - 4
test/ext/ext_scalar_common.cpp

@@ -45,7 +45,7 @@ static int test_min_nan()
 
 	T const A = static_cast<T>(0);
 	T const B = static_cast<T>(1);
-	T const N = GLM_NAN;
+	T const N = static_cast<T>(GLM_NAN);
 	Error += glm::isnan(glm::min(N, B)) ? 0 : 1;
 	Error += !glm::isnan(glm::min(B, N)) ? 0 : 1;
 
@@ -104,7 +104,7 @@ static int test_max_nan()
 
 	T const A = static_cast<T>(0);
 	T const B = static_cast<T>(1);
-	T const N = GLM_NAN;
+	T const N = static_cast<T>(GLM_NAN);
 	Error += glm::isnan(glm::max(N, B)) ? 0 : 1;
 	Error += !glm::isnan(glm::max(B, N)) ? 0 : 1;
 
@@ -134,7 +134,7 @@ static int test_fmin()
 
 	T const A = static_cast<T>(0);
 	T const B = static_cast<T>(1);
-	T const N = GLM_NAN;
+	T const N = static_cast<T>(GLM_NAN);
 	Error += glm::equal(glm::fmin(N, B), B, glm::epsilon<T>()) ? 0 : 1;
 	Error += glm::equal(glm::fmin(B, N), B, glm::epsilon<T>()) ? 0 : 1;
 
@@ -164,7 +164,7 @@ static int test_fmax()
 
 	T const A = static_cast<T>(0);
 	T const B = static_cast<T>(1);
-	T const N = GLM_NAN;
+	T const N = static_cast<T>(GLM_NAN);
 	Error += glm::equal(glm::fmax(N, B), B, glm::epsilon<T>()) ? 0 : 1;
 	Error += glm::equal(glm::fmax(B, N), B, glm::epsilon<T>()) ? 0 : 1;