mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed Clang warnings
This commit is contained in:
parent
e19734f6fc
commit
82d257abce
@ -54,6 +54,32 @@ namespace detail
|
||||
template<int N, typename T, qualifier Q, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>
|
||||
struct _swizzle_base2 : public _swizzle_base1<N, T, Q, E0,E1,E2,E3, detail::is_aligned<Q>::value>
|
||||
{
|
||||
struct op_equal
|
||||
{
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e = t; }
|
||||
};
|
||||
|
||||
struct op_minus
|
||||
{
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e -= t; }
|
||||
};
|
||||
|
||||
struct op_plus
|
||||
{
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e += t; }
|
||||
};
|
||||
|
||||
struct op_mul
|
||||
{
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e *= t; }
|
||||
};
|
||||
|
||||
struct op_div
|
||||
{
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e /= t; }
|
||||
};
|
||||
|
||||
public:
|
||||
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const T& t)
|
||||
{
|
||||
for (int i = 0; i < N; ++i)
|
||||
@ -63,43 +89,28 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER _swizzle_base2& operator= (vec<N, T, Q> const& that)
|
||||
{
|
||||
struct op {
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e = t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
_apply_op(that, op_equal());
|
||||
return *this;
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER void operator -= (vec<N, T, Q> const& that)
|
||||
{
|
||||
struct op {
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e -= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
_apply_op(that, op_minus());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER void operator += (vec<N, T, Q> const& that)
|
||||
{
|
||||
struct op {
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e += t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
_apply_op(that, op_plus());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER void operator *= (vec<N, T, Q> const& that)
|
||||
{
|
||||
struct op {
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e *= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
_apply_op(that, op_mul());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER void operator /= (vec<N, T, Q> const& that)
|
||||
{
|
||||
struct op {
|
||||
GLM_FUNC_QUALIFIER void operator() (T& e, T& t) const{ e /= t; }
|
||||
};
|
||||
_apply_op(that, op());
|
||||
_apply_op(that, op_div());
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER T& operator[](size_t i)
|
||||
|
Loading…
Reference in New Issue
Block a user