Browse Source

Fixed warnings on GCC

Christophe Riccio 12 years ago
parent
commit
48fcbd6ec4
3 changed files with 21 additions and 12 deletions
  1. 7 4
      glm/detail/type_mat2x2.hpp
  2. 7 4
      glm/detail/type_mat3x3.hpp
  3. 7 4
      glm/detail/type_mat4x4.hpp

+ 7 - 4
glm/detail/type_mat2x2.hpp

@@ -50,10 +50,13 @@ namespace detail
 
 
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 
 
-		friend tmat2x2<T, P> inverse(tmat2x2<T, P> const & m);
-		friend col_type operator/(tmat2x2<T, P> const & m, row_type const & v);
-		friend row_type operator/(row_type const & v, tmat2x2<T, P> const & m);
-		
+		template <typename U, precision Q>
+		friend tmat2x2<U, Q> inverse(tmat2x2<U, Q> const & m);
+		template <typename U, precision Q>
+		friend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);
+		template <typename U, precision Q>
+		friend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);
+
 	private:
 	private:
 		/// @cond DETAIL
 		/// @cond DETAIL
 		col_type value[2];
 		col_type value[2];

+ 7 - 4
glm/detail/type_mat3x3.hpp

@@ -50,10 +50,13 @@ namespace detail
 
 
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 
 
-		friend tmat3x3<T, P> inverse(tmat3x3<T, P> const & m);
-		friend col_type operator/(tmat3x3<T, P> const & m, row_type const & v);
-		friend row_type operator/(row_type const & v, tmat3x3<T, P> const & m);
-		
+		template <typename U, precision Q>
+		friend tmat3x3<U, Q> inverse(tmat3x3<U, Q> const & m);
+		template <typename U, precision Q>
+		friend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);
+		template <typename U, precision Q>
+		friend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);
+
 	private:
 	private:
 		/// @cond DETAIL
 		/// @cond DETAIL
 		col_type value[3];
 		col_type value[3];

+ 7 - 4
glm/detail/type_mat4x4.hpp

@@ -54,10 +54,13 @@ namespace detail
 
 
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 		GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;
 
 
-		friend tmat4x4<T, P> inverse(tmat4x4<T, P> const & m);
-		friend col_type operator/(tmat4x4<T, P> const & m, row_type const & v);
-		friend row_type operator/(row_type const & v, tmat4x4<T, P> const & m);
-		
+		template <typename U, precision Q>
+		friend tmat4x4<U, Q> inverse(tmat4x4<U, Q> const & m);
+		template <typename U, precision Q>
+		friend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);
+		template <typename U, precision Q>
+		friend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);
+
 	private:
 	private:
 		/// @cond DETAIL
 		/// @cond DETAIL
 		col_type value[4];
 		col_type value[4];