From 9edd8aacf0388f3bd4ad70e0f38f7e7c3a133ae1 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 4 Jan 2014 13:47:30 +0100 Subject: [PATCH] Remove is_vector --- glm/detail/func_vector_relational.inl | 13 ------------- glm/detail/type_vec.hpp | 21 --------------------- glm/detail/type_vec1.hpp | 2 -- glm/detail/type_vec2.hpp | 2 -- glm/detail/type_vec3.hpp | 2 -- glm/detail/type_vec4.hpp | 2 -- 6 files changed, 42 deletions(-) diff --git a/glm/detail/func_vector_relational.inl b/glm/detail/func_vector_relational.inl index b1131fd7..b54ddc02 100644 --- a/glm/detail/func_vector_relational.inl +++ b/glm/detail/func_vector_relational.inl @@ -106,8 +106,6 @@ namespace glm vecType const & y ) { - //GLM_STATIC_ASSERT(detail::is_vector >::_YES, - // "Invalid template instantiation of 'equal', GLM vector types required"); assert(x.length() == y.length()); typename vecType::bool_type Result(vecType::_null); @@ -123,8 +121,6 @@ namespace glm vecType const & y ) { - //GLM_STATIC_ASSERT(detail::is_vector >::_YES, - // "Invalid template instantiation of 'notEqual', GLM vector types required"); assert(x.length() == y.length()); typename vecType::bool_type Result(vecType::_null); @@ -136,9 +132,6 @@ namespace glm template class vecType> GLM_FUNC_QUALIFIER bool any(vecType const & v) { - //GLM_STATIC_ASSERT(detail::is_vector >::_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 class vecType> GLM_FUNC_QUALIFIER bool all(vecType const & v) { - //GLM_STATIC_ASSERT(detail::is_vector >::_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 class vecType> GLM_FUNC_QUALIFIER vecType not_(vecType const & v) { - //GLM_STATIC_ASSERT(detail::is_vector >::_YES, - // "Invalid template instantiation of 'not_', GLM vector types required"); - typename vecType::bool_type Result(vecType::_null); for(int i = 0; i < v.length(); ++i) Result[i] = !v[i]; diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index a36055b9..08c61545 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -39,27 +39,6 @@ namespace detail template struct tvec2; template struct tvec3; template struct tvec4; - - template - struct is_vector - { - enum is_vector_enum - { - _YES = 0, - _NO = 1 - }; - }; - -# define GLM_DETAIL_IS_VECTOR(TYPE) \ - template \ - struct is_vector > \ - { \ - enum is_vector_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } }//namespace detail typedef detail::tvec1 highp_vec1_t; diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index 5480d3f0..ae4b1369 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -184,8 +184,6 @@ namespace detail GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); }; - GLM_DETAIL_IS_VECTOR(tvec1); - }//namespace detail }//namespace glm diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index e9a3970c..a1a3d678 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -217,8 +217,6 @@ namespace detail GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); }; - GLM_DETAIL_IS_VECTOR(tvec2); - template GLM_FUNC_DECL tvec2 operator+(tvec2 const & v, T const & s); diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 3985d6e4..f55aeb70 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -235,8 +235,6 @@ namespace detail GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); }; - GLM_DETAIL_IS_VECTOR(tvec3); - template GLM_FUNC_DECL tvec3 operator+(tvec3 const & v, T const & s); diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 91768c7d..127ec20e 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -272,8 +272,6 @@ namespace detail GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); }; - GLM_DETAIL_IS_VECTOR(tvec4); - template GLM_FUNC_DECL tvec4 operator+(tvec4 const & v, T const & s);