Fixed VC14 compiler warnings

This commit is contained in:
Christophe Riccio 2014-07-18 00:59:07 +02:00
parent cff845c2b4
commit 666475a84c
3 changed files with 26 additions and 29 deletions

View File

@ -244,13 +244,13 @@ namespace detail
GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> & operator+=(T s); GLM_FUNC_DECL tvec4<T, P> & operator+=(T v);
GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> & operator-=(T s); GLM_FUNC_DECL tvec4<T, P> & operator-=(T v);
GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> & operator*=(T s); GLM_FUNC_DECL tvec4<T, P> & operator*=(T v);
GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<T, P> const & v);
GLM_FUNC_DECL tvec4<T, P> & operator/=(T s); GLM_FUNC_DECL tvec4<T, P> & operator/=(T v);
GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<T, P> const & v); GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<T, P> const & v);
template <typename U, precision Q> template <typename U, precision Q>

View File

@ -295,12 +295,12 @@ namespace detail
#endif #endif
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (T s) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (T v)
{ {
this->x += s; this->x += v;
this->y += s; this->y += v;
this->z += s; this->z += v;
this->w += s; this->w += v;
return *this; return *this;
} }
@ -331,12 +331,12 @@ namespace detail
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (T s) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (T v)
{ {
this->x -= s; this->x -= v;
this->y -= s; this->y -= v;
this->z -= s; this->z -= v;
this->w -= s; this->w -= v;
return *this; return *this;
} }
@ -351,12 +351,12 @@ namespace detail
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (T s) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (T v)
{ {
this->x *= s; this->x *= v;
this->y *= s; this->y *= v;
this->z *= s; this->z *= v;
this->w *= s; this->w *= v;
return *this; return *this;
} }
@ -371,12 +371,12 @@ namespace detail
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (T s) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (T v)
{ {
this->x /= s; this->x /= v;
this->y /= s; this->y /= v;
this->z /= s; this->z /= v;
this->w /= s; this->w /= v;
return *this; return *this;
} }
@ -390,9 +390,6 @@ namespace detail
return *this; return *this;
} }
template <typename T, precision P> template <typename T, precision P>
template <typename U, precision Q> template <typename U, precision Q>
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<U, Q> const & v) GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<U, Q> const & v)

View File

@ -114,9 +114,9 @@ namespace detail
detail::tvec3<T, P> const & v detail::tvec3<T, P> const & v
) )
{ {
detail::tvec3<T, P> w = cross(u, v); detail::tvec3<T, P> const LocalW(cross(u, v));
T Dot = detail::compute_dot<detail::tvec3, T, P>::call(u, v); T Dot = detail::compute_dot<detail::tvec3, T, P>::call(u, v);
detail::tquat<T, P> q(T(1) + Dot, w.x, w.y, w.z); detail::tquat<T, P> q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z);
*this = normalize(q); *this = normalize(q);
} }