From fdd362656c0ef5ffc13ce8cf4f090c3968c8da8a Mon Sep 17 00:00:00 2001 From: JF Date: Thu, 8 Dec 2016 10:40:00 +0100 Subject: [PATCH] Ignore VC C4201 warnings. --- glm/detail/type_vec1.hpp | 11 +++++++++-- glm/detail/type_vec2.hpp | 11 +++++++++-- glm/detail/type_vec3.hpp | 9 ++++++++- glm/detail/type_vec4.hpp | 9 ++++++++- glm/gtc/quaternion.hpp | 11 +++++++++-- 5 files changed, 43 insertions(+), 8 deletions(-) diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 0d54ae00..6bee52d3 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -37,7 +37,11 @@ namespace glm # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" # endif - +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) +# endif + union { T x; @@ -56,7 +60,10 @@ namespace glm _GLM_SWIZZLE1_4_MEMBERS(T, P, tvec4, s) # endif//GLM_SWIZZLE*/ }; - + +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index d7f7c213..68fae5bb 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -36,7 +36,11 @@ namespace glm # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" # endif - +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) +# endif + union { struct{ T x, y; }; @@ -56,7 +60,10 @@ namespace glm # endif//GLM_SWIZZLE }; - + +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 4fcb9643..1927083d 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -35,6 +35,10 @@ namespace glm # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" +# endif +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) # endif union @@ -55,7 +59,10 @@ namespace glm _GLM_SWIZZLE3_4_MEMBERS(T, P, glm::tvec4, s, t, p) # endif//GLM_SWIZZLE }; - + +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index c3923b4a..a07b20c9 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -36,7 +36,11 @@ namespace glm # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" # endif - +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) +# endif + union { struct { T x, y, z, w;}; @@ -58,6 +62,9 @@ namespace glm # endif//GLM_SWIZZLE }; +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 7a59702a..b10966e4 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -49,13 +49,20 @@ namespace glm # pragma clang diagnostic ignored "-Wgnu-anonymous-struct" # pragma clang diagnostic ignored "-Wnested-anon-types" # endif - +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(push) +# pragma warning(disable: 4201) +# endif + union { struct { T x, y, z, w;}; typename detail::storage::value>::type data; }; - + +# if GLM_COMPILER & GLM_COMPILER_VC +# pragma warning(pop) +# endif # if GLM_COMPILER & GLM_COMPILER_CLANG # pragma clang diagnostic pop # endif