diff --git a/glm/gtx/range.hpp b/glm/gtx/range.hpp index 3ab5faee..e0ef46af 100644 --- a/glm/gtx/range.hpp +++ b/glm/gtx/range.hpp @@ -31,6 +31,11 @@ namespace glm /// @addtogroup gtx_range /// @{ +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable : 4100) // unreferenced formal parameter +# endif + template inline length_t components(vec<1, T, Q> const& v) { @@ -85,5 +90,9 @@ namespace glm return begin(v) + components(v); } +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif + /// @} }//namespace glm diff --git a/test/core/core_func_integer_find_lsb.cpp b/test/core/core_func_integer_find_lsb.cpp index ed096ead..e238c2fa 100644 --- a/test/core/core_func_integer_find_lsb.cpp +++ b/test/core/core_func_integer_find_lsb.cpp @@ -1,6 +1,4 @@ -// This has the programs for computing the number of trailing zeros -// in a word. -// Max line length is 57, to fit in hacker.book. +#include #include #include //To define "exit", req'd by XLC. #include @@ -145,6 +143,11 @@ int ntz7(unsigned x) return bz + b4 + b3 + b2 + b1 + b0; } +// This file has divisions by zero to test isnan +#if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(disable : 4800) +#endif + int ntz7_christophe(unsigned x) { unsigned y, bz, b4, b3, b2, b1, b0; diff --git a/test/core/core_func_integer_find_msb.cpp b/test/core/core_func_integer_find_msb.cpp index f37a44e4..503ff546 100644 --- a/test/core/core_func_integer_find_msb.cpp +++ b/test/core/core_func_integer_find_msb.cpp @@ -1,7 +1,4 @@ -// This has the programs for computing the number of leading zeros -// in a word. -// Max line length is 57, to fit in hacker.book. -// Compile with g++, not gcc. +#include #include #include // To define "exit", req'd by XLC. #include diff --git a/test/core/core_type_vec4.cpp b/test/core/core_type_vec4.cpp index 69eedace..9f40771d 100644 --- a/test/core/core_type_vec4.cpp +++ b/test/core/core_type_vec4.cpp @@ -150,13 +150,16 @@ static int test_bvec4_ctor() glm::bvec4 const D = A && B; glm::bvec4 const E = A && C; glm::bvec4 const F = A || C; - bool const G = A == C; - bool const H = A != C; Error += D == glm::bvec4(true) ? 0 : 1; Error += E == glm::bvec4(false) ? 0 : 1; Error += F == glm::bvec4(true) ? 0 : 1; + bool const G = A == C; + bool const H = A != C; + Error += !G ? 0 : 1; + Error += H ? 0 : 1; + return Error; } diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index 5ea34ec0..2e635b98 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -420,7 +420,7 @@ namespace taylorCos Error += glm::abs(Cos1 - Cos0) < 0.1f ? 0 : 1; float const Cos2 = taylorCos::fastCosNew(glm::fvec1(radAngle)).x; - //Error += glm::abs(Cos2 - Cos0) < 0.1f ? 0 : 1; + Error += glm::abs(Cos2 - Cos0) < 0.1f ? 0 : 1; assert(!Error); }