diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index 1a135dc2..56b38949 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -442,7 +442,7 @@ (((GLM_LANG & GLM_LANG_CXX11) == GLM_LANG_CXX11) || ((GLM_LANG & GLM_LANG_CXXMS) == GLM_LANG_CXXMS) || ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_LANG == GLM_LANG_CXX0X))) #define GLM_SUPPORT_SWIZZLE_OPERATOR() \ - (defined(GLM_SWIZZLE) && GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) + (/*defined(GLM_SWIZZLE) && */GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) #define GLM_SUPPORT_SWIZZLE_FUNCTION() defined(GLM_SWIZZLE) diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index 1b2f0602..17471ee6 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -47,7 +47,7 @@ namespace glm{ namespace detail { -#if(!GLM_SUPPORT_SWIZZLE_OPERATOR()) +#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) template <> struct tvec2 { @@ -345,7 +345,7 @@ namespace detail tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; tref4 swizzle(comp X, comp Y, comp Z, comp W); }; -#endif//(!GLM_SUPPORT_SWIZZLE_OPERATOR()) +#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) } //namespace detail diff --git a/glm/gtc/half_float.inl b/glm/gtc/half_float.inl index 6f3edff9..863cf3f1 100644 --- a/glm/gtc/half_float.inl +++ b/glm/gtc/half_float.inl @@ -29,7 +29,7 @@ namespace glm{ namespace detail { -#if(!GLM_SUPPORT_SWIZZLE_OPERATOR()) +#if(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) ////////////////////////////////////// // hvec2 @@ -1003,7 +1003,7 @@ namespace detail (*this)[w]); } -#endif//(!GLM_SUPPORT_SWIZZLE_OPERATOR()) +#endif//(!GLM_SUPPORT_ANONYMOUS_UNION_OF_STRUCTURE()) }//namespace detail }//namespace glm diff --git a/test/core/core_func_swizzle.cpp b/test/core/core_func_swizzle.cpp index d0281a46..5b57a379 100644 --- a/test/core/core_func_swizzle.cpp +++ b/test/core/core_func_swizzle.cpp @@ -11,7 +11,7 @@ //#define GLM_FORCE_PURE #define GLM_MESSAGES #define GLM_SWIZZLE -//#define GLM_FORCE_CXX98 +#define GLM_FORCE_CXX98 #include int test_vec2_swizzle() @@ -24,6 +24,7 @@ int test_vec2_swizzle() C.xy() = B.xy(); Error += A == B ? 0 : 1; + Error += A == C ? 0 : 1; return Error; } @@ -38,6 +39,7 @@ int test_vec3_swizzle() C.xyz() = B.xyz(); Error += A == B ? 0 : 1; + Error += A == C ? 0 : 1; return Error; } @@ -52,6 +54,7 @@ int test_vec4_swizzle() C.xyzw() = B.xyzw(); Error += A == B ? 0 : 1; + Error += A == C ? 0 : 1; return Error; }