Skip to content

Commit

Permalink
More consistent resolution of shadow warnings #595
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Jan 4, 2017
2 parents e8962dd + 9e45b45 commit eda6c93
Show file tree
Hide file tree
Showing 10 changed files with 354 additions and 238 deletions.
48 changes: 24 additions & 24 deletions glm/detail/type_vec1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ namespace glm
// -- Implicit basic constructors --

GLM_FUNC_DECL GLM_CONSTEXPR vec() GLM_DEFAULT_CTOR;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const & v) GLM_DEFAULT;
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec const& v) GLM_DEFAULT;
template<precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, T, Q> const& v);

// -- Explicit basic constructors --

Expand All @@ -96,17 +96,17 @@ namespace glm

/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const& v);

/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<1, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<1, U, Q> const& v);

// -- Swizzle constructors --
/*
Expand All @@ -123,23 +123,23 @@ namespace glm
GLM_FUNC_DECL vec & operator=(vec const & v) GLM_DEFAULT;

template<typename U>
GLM_FUNC_DECL vec & operator=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator+=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator+=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator-=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator-=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator*=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator*=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator/=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator/=(vec<1, U, P> const& v);

// -- Increment and decrement operators --

Expand All @@ -153,56 +153,56 @@ namespace glm
template<typename U>
GLM_FUNC_DECL vec & operator%=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator%=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator&=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator&=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator|=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator|=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator^=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator^=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator<<=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator<<=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec & operator>>=(U scalar);
template<typename U>
GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec & operator>>=(vec<1, U, P> const& v);
};

// -- Unary operators --

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v);
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v);
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v);

// -- Binary operators --

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v, T scalar);
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v, T scalar);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const & v);
GLM_FUNC_DECL vec<1, T, P> operator+(T scalar, vec<1, T, P> const& v);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const & v1, vec<1, T, P> const & v2);
GLM_FUNC_DECL vec<1, T, P> operator+(vec<1, T, P> const& v1, vec<1, T, P> const& v2);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const & v, T scalar);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const & v);
GLM_FUNC_DECL vec<1, T, P> operator-(T scalar, vec<1, T, P> const& v);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator- (vec<1, T, P> const & v1, vec<1, T, P> const & v2);
GLM_FUNC_DECL vec<1, T, P> operator-(vec<1, T, P> const& v1, vec<1, T, P> const & v2);

template<typename T, precision P>
GLM_FUNC_DECL vec<1, T, P> operator*(vec<1, T, P> const & v, T scalar);
Expand Down
28 changes: 14 additions & 14 deletions glm/detail/type_vec2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,28 @@ namespace glm

GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit vec(ctor);
GLM_FUNC_DECL GLM_CONSTEXPR explicit vec(T scalar);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T s1, T s2);
GLM_FUNC_DECL GLM_CONSTEXPR vec(T x, T y);

// -- Conversion constructors --

/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR vec(A x, B y);
template<typename A, typename B>
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const & v1, vec<1, B, P> const & v2);
GLM_FUNC_DECL GLM_CONSTEXPR vec(vec<1, A, P> const& x, vec<1, B, P> const& y);

// -- Conversion vector constructors --

/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<3, U, Q> const& v);
/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<4, U, Q> const& v);

/// Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)
template<typename U, precision Q>
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> const & v);
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT vec(vec<2, U, Q> const& v);

// -- Swizzle constructors --
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
Expand All @@ -129,31 +129,31 @@ namespace glm
GLM_FUNC_DECL vec& operator=(vec const & v) GLM_DEFAULT;

template<typename U>
GLM_FUNC_DECL vec& operator=(vec<2, U, P> const & v);
GLM_FUNC_DECL vec& operator=(vec<2, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator+=(U scalar);
template<typename U>
GLM_FUNC_DECL vec& operator+=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec& operator+=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator+=(vec<2, U, P> const & v);
GLM_FUNC_DECL vec& operator+=(vec<2, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator-=(U scalar);
template<typename U>
GLM_FUNC_DECL vec& operator-=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec& operator-=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator-=(vec<2, U, P> const & v);
GLM_FUNC_DECL vec& operator-=(vec<2, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator*=(U scalar);
template<typename U>
GLM_FUNC_DECL vec& operator*=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec& operator*=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator*=(vec<2, U, P> const & v);
GLM_FUNC_DECL vec& operator*=(vec<2, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator/=(U scalar);
template<typename U>
GLM_FUNC_DECL vec& operator/=(vec<1, U, P> const & v);
GLM_FUNC_DECL vec& operator/=(vec<1, U, P> const& v);
template<typename U>
GLM_FUNC_DECL vec& operator/=(vec<2, U, P> const & v);
GLM_FUNC_DECL vec& operator/=(vec<2, U, P> const& v);

// -- Increment and decrement operators --

Expand Down
Loading

0 comments on commit eda6c93

Please sign in to comment.