From a41c4d83d299c05b319400d1d1334aa764c1dd9a Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 7 Aug 2017 14:34:28 +0200 Subject: [PATCH] Fixed warning tests --- test/gtc/gtc_integer.cpp | 4 ++-- test/gtc/gtc_type_precision.cpp | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/gtc/gtc_integer.cpp b/test/gtc/gtc_integer.cpp index 1e207581..7cf03718 100644 --- a/test/gtc/gtc_integer.cpp +++ b/test/gtc/gtc_integer.cpp @@ -188,8 +188,8 @@ namespace iround for(float f = 0.0f; f < 3.1f; f += 0.05f) { - int RoundFast = glm::iround(f); - int RoundSTD = glm::round(f); + int RoundFast = static_cast(glm::iround(f)); + int RoundSTD = static_cast(glm::round(f)); Error += RoundFast == RoundSTD ? 0 : 1; assert(!Error); } diff --git a/test/gtc/gtc_type_precision.cpp b/test/gtc/gtc_type_precision.cpp index 05a2dc85..6ba4a6ce 100644 --- a/test/gtc/gtc_type_precision.cpp +++ b/test/gtc/gtc_type_precision.cpp @@ -848,6 +848,7 @@ static int test_fvec_conversion() return Error; } +#if GLM_HAS_OPENMP static int test_openmp() { std::vector VectorA(1000); @@ -868,11 +869,16 @@ static int test_openmp() return 0; } +#endif//GLM_HAS_OPENMP int main() { - int Error(0); - Error += test_openmp(); + int Error = 0; + +# if GLM_HAS_OPENMP + Error += test_openmp(); +# endif// + Error += test_scalar_size(); Error += test_fvec_size(); Error += test_fvec_precision(); @@ -886,5 +892,6 @@ int main() Error += test_dmat_size(); Error += test_quat_size(); Error += test_quat_precision(); + return Error; }