diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index e2a82cc1..3860882c 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -128,19 +128,19 @@ namespace glm template GLM_FUNC_DECL vec & operator=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator+=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator+=(U scalar); template GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator-=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator-=(U scalar); template GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator*=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator*=(U scalar); template GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator/=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator/=(U scalar); template GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const& v); @@ -154,27 +154,27 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator%=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator%=(U scalar); template GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator&=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator&=(U scalar); template GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator|=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator|=(U scalar); template GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator^=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator^=(U scalar); template GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator<<=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator<<=(U scalar); template GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 1, T, P, U) operator>>=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator>>=(U scalar); template GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const& v); }; diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 8730fe06..71b3f216 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -101,7 +101,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator+=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator+=(U scalar) { this->x += static_cast(scalar); return *this; @@ -117,7 +117,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator-=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator-=(U scalar) { this->x -= static_cast(scalar); return *this; @@ -133,7 +133,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator*=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator*=(U scalar) { this->x *= static_cast(scalar); return *this; @@ -149,7 +149,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator/=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator/=(U scalar) { this->x /= static_cast(scalar); return *this; @@ -199,7 +199,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator%=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator%=(U scalar) { this->x %= static_cast(scalar); return *this; @@ -215,7 +215,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator&=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator&=(U scalar) { this->x &= static_cast(scalar); return *this; @@ -231,7 +231,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator|=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator|=(U scalar) { this->x |= static_cast(scalar); return *this; @@ -247,7 +247,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator^=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator^=(U scalar) { this->x ^= static_cast(scalar); return *this; @@ -263,7 +263,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator<<=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator<<=(U scalar) { this->x <<= static_cast(scalar); return *this; @@ -279,7 +279,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 1, T, P, U) vec<1, T, P>::operator>>=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 1, T, P, U) vec<1, T, P>::operator>>=(U scalar) { this->x >>= static_cast(scalar); return *this; diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 3e61bc9f..20ce1762 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -134,25 +134,25 @@ namespace glm template GLM_FUNC_DECL vec& operator=(vec<2, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator+=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator+=(U scalar); template GLM_FUNC_DECL vec& operator+=(vec<1, U, P> const& v); template GLM_FUNC_DECL vec& operator+=(vec<2, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator-=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator-=(U scalar); template GLM_FUNC_DECL vec& operator-=(vec<1, U, P> const& v); template GLM_FUNC_DECL vec& operator-=(vec<2, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator*=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator*=(U scalar); template GLM_FUNC_DECL vec& operator*=(vec<1, U, P> const& v); template GLM_FUNC_DECL vec& operator*=(vec<2, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator/=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator/=(U scalar); template GLM_FUNC_DECL vec& operator/=(vec<1, U, P> const& v); template @@ -168,37 +168,37 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator%=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator%=(U scalar); template GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator%=(vec<2, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator&=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator&=(U scalar); template GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator&=(vec<2, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator|=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator|=(U scalar); template GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator|=(vec<2, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator^=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator^=(U scalar); template GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator^=(vec<2, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator<<=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator<<=(U scalar); template GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator<<=(vec<2, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 2, T, P, U) operator>>=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator>>=(U scalar); template GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v); template diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index 9e5172d2..7924011e 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -121,7 +121,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator+=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator+=(U scalar) { this->x += static_cast(scalar); this->y += static_cast(scalar); @@ -148,7 +148,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator-=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator-=(U scalar) { this->x -= static_cast(scalar); this->y -= static_cast(scalar); @@ -175,7 +175,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator*=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator*=(U scalar) { this->x *= static_cast(scalar); this->y *= static_cast(scalar); @@ -202,7 +202,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator/=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator/=(U scalar) { this->x /= static_cast(scalar); this->y /= static_cast(scalar); @@ -265,7 +265,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator%=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator%=(U scalar) { this->x %= static_cast(scalar); this->y %= static_cast(scalar); @@ -292,7 +292,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator&=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator&=(U scalar) { this->x &= static_cast(scalar); this->y &= static_cast(scalar); @@ -319,7 +319,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator|=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator|=(U scalar) { this->x |= static_cast(scalar); this->y |= static_cast(scalar); @@ -346,7 +346,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator^=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator^=(U scalar) { this->x ^= static_cast(scalar); this->y ^= static_cast(scalar); @@ -373,7 +373,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator<<=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator<<=(U scalar) { this->x <<= static_cast(scalar); this->y <<= static_cast(scalar); @@ -400,7 +400,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 2, T, P, U) vec<2, T, P>::operator>>=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 2, T, P, U) vec<2, T, P>::operator>>=(U scalar) { this->x >>= static_cast(scalar); this->y >>= static_cast(scalar); diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index a90102ef..263e9909 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -155,25 +155,25 @@ namespace glm template GLM_FUNC_DECL vec & operator=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator+=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator+=(U scalar); template GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator+=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator-=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator-=(U scalar); template GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator-=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator*=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator*=(U scalar); template GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator*=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator/=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator/=(U scalar); template GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const & v); template @@ -189,37 +189,37 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator%=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator%=(U scalar); template GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator%=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator&=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator&=(U scalar); template GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator&=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator|=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator|=(U scalar); template GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator|=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator^=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator^=(U scalar); template GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator^=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator<<=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator<<=(U scalar); template GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec & operator<<=(vec<3, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) operator>>=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator>>=(U scalar); template GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v); template diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index da2faf2f..fb94c04e 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -152,7 +152,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator+=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator+=(U scalar) { this->x += static_cast(scalar); this->y += static_cast(scalar); @@ -182,7 +182,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator-=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator-=(U scalar) { this->x -= static_cast(scalar); this->y -= static_cast(scalar); @@ -212,7 +212,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator*=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator*=(U scalar) { this->x *= static_cast(scalar); this->y *= static_cast(scalar); @@ -242,7 +242,7 @@ namespace glm template template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator/=(U v) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator/=(U v) { this->x /= static_cast(v); this->y /= static_cast(v); @@ -310,7 +310,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator%=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator%=(U scalar) { this->x %= scalar; this->y %= scalar; @@ -340,7 +340,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator&=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator&=(U scalar) { this->x &= scalar; this->y &= scalar; @@ -370,7 +370,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator|=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator|=(U scalar) { this->x |= scalar; this->y |= scalar; @@ -400,7 +400,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator^=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator^=(U scalar) { this->x ^= scalar; this->y ^= scalar; @@ -430,7 +430,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator<<=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator<<=(U scalar) { this->x <<= scalar; this->y <<= scalar; @@ -460,7 +460,7 @@ namespace glm template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 3, T, P, U) vec<3, T, P>::operator>>=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 3, T, P, U) vec<3, T, P>::operator>>=(U scalar) { this->x >>= static_cast(scalar); this->y >>= static_cast(scalar); diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index b62673bd..c18b97a6 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -200,25 +200,25 @@ namespace glm template GLM_FUNC_DECL vec<4, T, P>& operator=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator+=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator+=(U scalar); template GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P>& operator+=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator-=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator-=(U scalar); template GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P>& operator-=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator*=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator*=(U scalar); template GLM_FUNC_DECL vec<4, T, P>& operator*=(vec<1, U, P> const& v); template GLM_FUNC_DECL vec<4, T, P>& operator*=(vec<4, U, P> const& v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator/=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator/=(U scalar); template GLM_FUNC_DECL vec<4, T, P>& operator/=(vec<1, U, P> const & v); template @@ -234,37 +234,37 @@ namespace glm // -- Unary bit operators -- template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator%=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator%=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P> & operator%=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator&=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator&=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P> & operator&=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator|=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator|=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P> & operator|=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator^=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator^=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P> & operator^=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator<<=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator<<=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<1, U, P> const & v); template GLM_FUNC_DECL vec<4, T, P> & operator<<=(vec<4, U, P> const & v); template - GLM_FUNC_DECL GLM_ONLY_SCALAR2(vec, 4, T, P, U) operator>>=(U scalar); + GLM_FUNC_DECL_ONLY_SCALAR(U) operator>>=(U scalar); template GLM_FUNC_DECL vec<4, T, P> & operator>>=(vec<1, U, P> const & v); template diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index dc5e611e..af7447ef 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -365,7 +365,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator+=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator+=(U scalar) { return (*this = detail::compute_vec4_add::value>::call(*this, vec<4, T, P>(scalar))); } @@ -386,7 +386,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator-=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator-=(U scalar) { return (*this = detail::compute_vec4_sub::value>::call(*this, vec<4, T, P>(scalar))); } @@ -407,7 +407,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator*=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator*=(U scalar) { return (*this = detail::compute_vec4_mul::value>::call(*this, vec<4, T, P>(scalar))); } @@ -428,7 +428,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator/=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator/=(U scalar) { return (*this = detail::compute_vec4_div::value>::call(*this, vec<4, T, P>(scalar))); } @@ -489,7 +489,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator%=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator%=(U scalar) { return (*this = detail::compute_vec4_mod::value>::call(*this, vec<4, T, P>(scalar))); } @@ -510,7 +510,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator&=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator&=(U scalar) { return (*this = detail::compute_vec4_and::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(scalar))); } @@ -531,7 +531,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator|=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator|=(U scalar) { return (*this = detail::compute_vec4_or::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(scalar))); } @@ -552,7 +552,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator^=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator^=(U scalar) { return (*this = detail::compute_vec4_xor::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(scalar))); } @@ -573,7 +573,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator<<=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator<<=(U scalar) { return (*this = detail::compute_vec4_shift_left::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(scalar))); } @@ -594,7 +594,7 @@ namespace detail template template - GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR2(vec, 4, T, P, U) vec<4, T, P>::operator>>=(U scalar) + GLM_FUNC_QUALIFIER GLM_ONLY_SCALAR_VEC(vec, 4, T, P, U) vec<4, T, P>::operator>>=(U scalar) { return (*this = detail::compute_vec4_shift_right::value, sizeof(T) * 8, detail::is_aligned

::value>::call(*this, vec<4, T, P>(scalar))); } diff --git a/glm/fwd.hpp b/glm/fwd.hpp index 852996f1..75c1370b 100644 --- a/glm/fwd.hpp +++ b/glm/fwd.hpp @@ -19,7 +19,8 @@ namespace glm template struct meta_if { typedef T type; }; template struct meta_if {}; #define GLM_ONLY_SCALAR(T) typename meta_if::value, T>::type -#define GLM_ONLY_SCALAR2(V,L,T,P,U) typename meta_if::value, V >::type & +#define GLM_ONLY_SCALAR_VEC(V,L,T,P,U) typename meta_if::value, V >::type & +#define GLM_FUNC_DECL_ONLY_SCALAR(U) GLM_FUNC_DECL typename meta_if::value, vec>::type & }//namespace glm //////////////////////