Browse Source

Remove is_vector

Christophe Riccio 12 years ago
parent
commit
9edd8aacf0

+ 0 - 13
glm/detail/func_vector_relational.inl

@@ -106,8 +106,6 @@ namespace glm
 		vecType<T, P> const & y
 	)
 	{
-		//GLM_STATIC_ASSERT(detail::is_vector<vecType<T, P> >::_YES,
-		//	"Invalid template instantiation of 'equal', GLM vector types required");
 		assert(x.length() == y.length());
 
 		typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
@@ -123,8 +121,6 @@ namespace glm
 		vecType<T, P> const & y
 	)
 	{
-		//GLM_STATIC_ASSERT(detail::is_vector<vecType<T, P> >::_YES,
-		//	"Invalid template instantiation of 'notEqual', GLM vector types required");
 		assert(x.length() == y.length());
 
 		typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
@@ -136,9 +132,6 @@ namespace glm
 	template <precision P, template <typename, precision> class vecType>
 	GLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)
 	{
-		//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
-		//	"Invalid template instantiation of 'any', GLM boolean vector types required");
-
 		bool Result = false;
 		for(int i = 0; i < v.length(); ++i)
 			Result = Result || v[i];
@@ -148,9 +141,6 @@ namespace glm
 	template <precision P, template <typename, precision> class vecType>
 	GLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)
 	{
-		//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
-		//	"Invalid template instantiation of 'all', GLM boolean vector types required");
-
 		bool Result = true;
 		for(int i = 0; i < v.length(); ++i)
 			Result = Result && v[i];
@@ -160,9 +150,6 @@ namespace glm
 	template <precision P, template <typename, precision> class vecType>
 	GLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)
 	{
-		//GLM_STATIC_ASSERT(detail::is_vector<vecType<bool, P> >::_YES,
-		//	"Invalid template instantiation of 'not_', GLM vector types required");
-
 		typename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);
 		for(int i = 0; i < v.length(); ++i)
 			Result[i] = !v[i];

+ 0 - 21
glm/detail/type_vec.hpp

@@ -39,27 +39,6 @@ namespace detail
 	template <typename T, precision P> struct tvec2;
 	template <typename T, precision P> struct tvec3;
 	template <typename T, precision P> struct tvec4;
-	
-	template <typename T>
-	struct is_vector
-	{
-		enum is_vector_enum
-		{
-			_YES = 0,
-			_NO = 1
-		};
-	};
-	
-#	define GLM_DETAIL_IS_VECTOR(TYPE)		\
-		template <typename T, precision P>	\
-		struct is_vector<TYPE<T, P> >		\
-		{									\
-			enum is_vector_enum				\
-			{								\
-				_YES = 1,					\
-				_NO = 0						\
-			};								\
-		}
 }//namespace detail
 	
 	typedef detail::tvec1<float, highp>		highp_vec1_t;

+ 0 - 2
glm/detail/type_vec1.hpp

@@ -184,8 +184,6 @@ namespace detail
 		GLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);
 	};
 
-	GLM_DETAIL_IS_VECTOR(tvec1);
-
 }//namespace detail
 }//namespace glm
 

+ 0 - 2
glm/detail/type_vec2.hpp

@@ -217,8 +217,6 @@ namespace detail
 		GLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);
 	};
 
-	GLM_DETAIL_IS_VECTOR(tvec2);
-
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);
 

+ 0 - 2
glm/detail/type_vec3.hpp

@@ -235,8 +235,6 @@ namespace detail
 		GLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);
 	};
 
-	GLM_DETAIL_IS_VECTOR(tvec3);
-
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);
 

+ 0 - 2
glm/detail/type_vec4.hpp

@@ -272,8 +272,6 @@ namespace detail
 		GLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);
 	};
 
-	GLM_DETAIL_IS_VECTOR(tvec4);
-
 	template <typename T, precision P>
 	GLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s);