diff --git a/test/gtx/gtx_hash.cpp b/test/gtx/gtx_hash.cpp index c93ff3e9..f25a8bad 100644 --- a/test/gtx/gtx_hash.cpp +++ b/test/gtx/gtx_hash.cpp @@ -1,4 +1,10 @@ #if __cplusplus >= 201103L + +#if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wfloat-equal" +#endif + #define GLM_ENABLE_EXPERIMENTAL #include @@ -18,11 +24,6 @@ static int test_compile() std::unordered_map map_vec4; Error += ++map_vec4[glm::ivec4(0)]; -#if GLM_COMPILER & GLM_COMPILER_CLANG -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wfloat-equal" -#endif - // Quaternion types std::unordered_map map_quat; Error += ++map_quat[glm::quat(0.0f, glm::vec3(0.0f))]; @@ -49,10 +50,6 @@ static int test_compile() std::unordered_map map_mat4x4; Error += ++map_mat4x4[glm::mat4x4(0.0f)]; -#if GLM_COMPILER & GLM_COMPILER_CLANG -# pragma clang diagnostic pop -#endif - return Error > 0 ? 0 : 1; } @@ -65,6 +62,10 @@ int main() return Error; } +#if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +#endif + #else int main()