Browse Source

Fixed VC14 compiler warnings

Christophe Riccio 11 years ago
parent
commit
666475a84c
3 changed files with 26 additions and 29 deletions
  1. 4 4
      glm/detail/type_vec4.hpp
  2. 20 23
      glm/detail/type_vec4.inl
  3. 2 2
      glm/gtc/quaternion.inl

+ 4 - 4
glm/detail/type_vec4.hpp

@@ -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+=(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-=(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*=(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/=(T s);
+		GLM_FUNC_DECL tvec4<T, P> & operator/=(T v);
 		GLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<T, P> const & v);
 		
 		template <typename U, precision Q>

+ 20 - 23
glm/detail/type_vec4.inl

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

+ 2 - 2
glm/gtc/quaternion.inl

@@ -114,9 +114,9 @@ namespace detail
 		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);
-		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);
 	}