From 99f8f49e8a704c85c41b160efc3f81de8bb12c41 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 3 Nov 2016 13:20:25 +0100 Subject: [PATCH] (GLM) Cut down on GLM_FUNC_QUALIFIER --- deps/glm/detail/_noise.hpp | 45 ++---- deps/glm/detail/_swizzle.hpp | 72 ++++----- deps/glm/detail/_vectorize.hpp | 26 ++-- deps/glm/detail/func_common.inl | 134 ++++++++-------- deps/glm/detail/func_exponential.inl | 36 ++--- deps/glm/detail/func_geometric.inl | 48 +++--- deps/glm/detail/func_integer.inl | 76 +++++----- deps/glm/detail/func_matrix.inl | 52 +++---- deps/glm/detail/func_noise.inl | 34 ++--- deps/glm/detail/func_packing.inl | 24 +-- deps/glm/detail/func_trigonometric.inl | 30 ++-- deps/glm/detail/func_vector_relational.inl | 18 +-- deps/glm/detail/intrinsic_common.hpp | 4 - deps/glm/detail/intrinsic_common.inl | 38 ++--- deps/glm/detail/intrinsic_exponential.hpp | 4 +- deps/glm/detail/intrinsic_geometric.inl | 18 +-- deps/glm/detail/intrinsic_matrix.inl | 28 ++-- deps/glm/detail/setup.hpp | 16 -- deps/glm/detail/type_half.inl | 12 +- deps/glm/detail/type_mat2x2.inl | 114 +++++++------- deps/glm/detail/type_mat2x3.inl | 98 ++++++------ deps/glm/detail/type_mat2x4.inl | 98 ++++++------ deps/glm/detail/type_mat3x2.inl | 98 ++++++------ deps/glm/detail/type_mat3x3.inl | 114 +++++++------- deps/glm/detail/type_mat3x4.inl | 98 ++++++------ deps/glm/detail/type_mat4x2.inl | 98 ++++++------ deps/glm/detail/type_mat4x3.inl | 102 ++++++------- deps/glm/detail/type_mat4x4.inl | 116 +++++++------- deps/glm/detail/type_vec1.inl | 148 +++++++++--------- deps/glm/detail/type_vec2.inl | 146 +++++++++--------- deps/glm/detail/type_vec3.inl | 148 +++++++++--------- deps/glm/detail/type_vec4.inl | 154 +++++++++---------- deps/glm/ext.hpp | 1 - deps/glm/gtc/constants.inl | 50 +++--- deps/glm/gtc/epsilon.inl | 20 +-- deps/glm/gtc/matrix_access.inl | 8 +- deps/glm/gtc/matrix_inverse.inl | 10 +- deps/glm/gtc/matrix_transform.inl | 32 ++-- deps/glm/gtc/noise.inl | 22 +-- deps/glm/gtc/packing.inl | 82 +++++----- deps/glm/gtc/quaternion.inl | 112 +++++++------- deps/glm/gtc/random.inl | 20 +-- deps/glm/gtc/reciprocal.inl | 24 +-- deps/glm/gtc/type_ptr.inl | 84 +++++------ deps/glm/gtc/ulp.inl | 28 ++-- deps/glm/gtx/associated_min_max.inl | 108 ++++++------- deps/glm/gtx/bit.inl | 94 ++++++------ deps/glm/gtx/closest_point.inl | 2 +- deps/glm/gtx/color_space.inl | 12 +- deps/glm/gtx/color_space_YCoCg.inl | 8 +- deps/glm/gtx/compatibility.hpp | 32 ++-- deps/glm/gtx/compatibility.inl | 8 +- deps/glm/gtx/component_wise.inl | 8 +- deps/glm/gtx/dual_quaternion.inl | 60 ++++---- deps/glm/gtx/euler_angles.inl | 30 ++-- deps/glm/gtx/extend.inl | 8 +- deps/glm/gtx/extented_min_max.inl | 24 +-- deps/glm/gtx/fast_exponential.inl | 24 +-- deps/glm/gtx/fast_square_root.inl | 26 ++-- deps/glm/gtx/fast_trigonometry.inl | 14 +- deps/glm/gtx/gradient_paint.inl | 4 +- deps/glm/gtx/handed_coordinate_space.inl | 4 +- deps/glm/gtx/inertia.hpp | 116 -------------- deps/glm/gtx/inertia.inl | 116 -------------- deps/glm/gtx/int_10_10_10_2.inl | 2 +- deps/glm/gtx/integer.inl | 30 ++-- deps/glm/gtx/intersect.inl | 14 +- deps/glm/gtx/io.inl | 50 +++--- deps/glm/gtx/log_base.inl | 2 +- deps/glm/gtx/matrix_cross_product.inl | 4 +- deps/glm/gtx/matrix_interpolation.inl | 8 +- deps/glm/gtx/matrix_major_storage.inl | 24 +-- deps/glm/gtx/matrix_operation.inl | 18 +-- deps/glm/gtx/matrix_query.inl | 16 +- deps/glm/gtx/matrix_transform_2d.hpp | 10 +- deps/glm/gtx/matrix_transform_2d.inl | 10 +- deps/glm/gtx/mixed_product.inl | 2 +- deps/glm/gtx/multiple.inl | 19 ++- deps/glm/gtx/norm.inl | 28 ++-- deps/glm/gtx/normal.inl | 2 +- deps/glm/gtx/normalize_dot.inl | 16 +- deps/glm/gtx/optimum_pow.inl | 14 +- deps/glm/gtx/orthonormalize.inl | 4 +- deps/glm/gtx/perpendicular.inl | 2 +- deps/glm/gtx/polar_coordinates.inl | 4 +- deps/glm/gtx/projection.inl | 2 +- deps/glm/gtx/quaternion.inl | 30 ++-- deps/glm/gtx/rotate_normalized_axis.inl | 4 +- deps/glm/gtx/rotate_vector.inl | 32 ++-- deps/glm/gtx/scalar_relational.inl | 18 +-- deps/glm/gtx/simd_mat4.inl | 90 +++++------ deps/glm/gtx/simd_quat.inl | 74 ++++----- deps/glm/gtx/simd_vec4.inl | 168 ++++++++++----------- deps/glm/gtx/spline.inl | 6 +- deps/glm/gtx/string_cast.inl | 76 +++++----- deps/glm/gtx/transform.inl | 6 +- deps/glm/gtx/transform2.inl | 22 +-- deps/glm/gtx/vector_angle.inl | 8 +- deps/glm/gtx/vector_query.inl | 30 ++-- deps/glm/gtx/wrap.inl | 24 +-- 100 files changed, 2010 insertions(+), 2297 deletions(-) delete mode 100644 deps/glm/gtx/inertia.hpp delete mode 100644 deps/glm/gtx/inertia.inl diff --git a/deps/glm/detail/_noise.hpp b/deps/glm/detail/_noise.hpp index bf779bf691..56bac3b312 100644 --- a/deps/glm/detail/_noise.hpp +++ b/deps/glm/detail/_noise.hpp @@ -33,96 +33,75 @@ namespace glm{ namespace detail { template - GLM_FUNC_QUALIFIER T mod289(T const & x) + inline T mod289(T const & x) { return x - floor(x * static_cast(1.0) / static_cast(289.0)) * static_cast(289.0); } template - GLM_FUNC_QUALIFIER T permute(T const & x) + inline T permute(T const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER tvec2 permute(tvec2 const & x) + inline tvec2 permute(tvec2 const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER tvec3 permute(tvec3 const & x) + inline tvec3 permute(tvec3 const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } template - GLM_FUNC_QUALIFIER tvec4 permute(tvec4 const & x) + inline tvec4 permute(tvec4 const & x) { return mod289(((x * static_cast(34)) + static_cast(1)) * x); } -/* - template class vecType> - GLM_FUNC_QUALIFIER vecType permute(vecType const & x) - { - return mod289(((x * T(34)) + T(1)) * x); - } -*/ template - GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r) + inline T taylorInvSqrt(T const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - GLM_FUNC_QUALIFIER detail::tvec2 taylorInvSqrt(detail::tvec2 const & r) + inline detail::tvec2 taylorInvSqrt(detail::tvec2 const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - GLM_FUNC_QUALIFIER detail::tvec3 taylorInvSqrt(detail::tvec3 const & r) + inline detail::tvec3 taylorInvSqrt(detail::tvec3 const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } template - GLM_FUNC_QUALIFIER detail::tvec4 taylorInvSqrt(detail::tvec4 const & r) + inline detail::tvec4 taylorInvSqrt(detail::tvec4 const & r) { return T(1.79284291400159) - T(0.85373472095314) * r; } -/* - template class vecType> - GLM_FUNC_QUALIFIER vecType taylorInvSqrt(vecType const & r) - { - return T(1.79284291400159) - T(0.85373472095314) * r; - } -*/ template - GLM_FUNC_QUALIFIER detail::tvec2 fade(detail::tvec2 const & t) + inline detail::tvec2 fade(detail::tvec2 const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } template - GLM_FUNC_QUALIFIER detail::tvec3 fade(detail::tvec3 const & t) + inline detail::tvec3 fade(detail::tvec3 const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } template - GLM_FUNC_QUALIFIER detail::tvec4 fade(detail::tvec4 const & t) + inline detail::tvec4 fade(detail::tvec4 const & t) { return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); } -/* - template class vecType> - GLM_FUNC_QUALIFIER vecType fade(vecType const & t) - { - return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); - } -*/ }//namespace detail }//namespace glm diff --git a/deps/glm/detail/_swizzle.hpp b/deps/glm/detail/_swizzle.hpp index 344a826f7e..d151ca36e8 100644 --- a/deps/glm/detail/_swizzle.hpp +++ b/deps/glm/detail/_swizzle.hpp @@ -39,8 +39,8 @@ namespace detail typedef T value_type; protected: - GLM_FUNC_QUALIFIER value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } - GLM_FUNC_QUALIFIER const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } + inline value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } + inline const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. // The size 1 buffer is assumed to aligned to the actual members so that the @@ -56,19 +56,19 @@ namespace detail template struct _swizzle_base1 : public _swizzle_base0 { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1)); } + inline V operator ()() const { return V(this->elem(E0), this->elem(E1)); } }; template struct _swizzle_base1 : public _swizzle_base0 { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } + inline V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } }; template struct _swizzle_base1 : public _swizzle_base0 { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } + inline V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } }; // Internal class for implementing swizzle operators @@ -89,67 +89,67 @@ namespace detail typedef VecType vec_type; typedef ValueType value_type; - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t) + inline _swizzle_base2& operator= (const ValueType& t) { for (int i = 0; i < N; ++i) (*this)[i] = t; return *this; } - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that) + inline _swizzle_base2& operator= (const VecType& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; } + inline void operator() (value_type& e, value_type& t) { e = t; } }; _apply_op(that, op()); return *this; } - GLM_FUNC_QUALIFIER void operator -= (const VecType& that) + inline void operator -= (const VecType& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; } + inline void operator() (value_type& e, value_type& t) { e -= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator += (const VecType& that) + inline void operator += (const VecType& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; } + inline void operator() (value_type& e, value_type& t) { e += t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator *= (const VecType& that) + inline void operator *= (const VecType& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; } + inline void operator() (value_type& e, value_type& t) { e *= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator /= (const VecType& that) + inline void operator /= (const VecType& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; } + inline void operator() (value_type& e, value_type& t) { e /= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER value_type& operator[] (size_t i) + inline value_type& operator[] (size_t i) { static const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } - GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const + inline value_type operator[] (size_t i) const { static const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } protected: template - GLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op) + inline void _apply_op(const VecType& that, T op) { // Make a copy of the data in this == &that. // The copier should optimize out the copy in cases where the function is @@ -170,9 +170,9 @@ namespace detail typedef ValueType value_type; struct Stub {}; - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; } + inline _swizzle_base2& operator= (Stub const &) { return *this; } - GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const + inline value_type operator[] (size_t i) const { static const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); @@ -186,7 +186,7 @@ namespace detail using base_type::operator=; - GLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); } + inline operator VecType () const { return (*this)(); } }; // @@ -202,17 +202,17 @@ namespace detail // #define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ _GLM_SWIZZLE_TEMPLATE2 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ { \ return a() OPERAND b(); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ + inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ { \ return a() OPERAND b; \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + inline V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return a OPERAND b(); \ } @@ -222,12 +222,12 @@ namespace detail // #define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ + inline V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ { \ return a() OPERAND b; \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ + inline V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return a OPERAND b(); \ } @@ -237,7 +237,7 @@ namespace detail // #define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ { \ return FUNCTION(a()); \ } @@ -247,22 +247,22 @@ namespace detail // #define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \ _GLM_SWIZZLE_TEMPLATE2 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ { \ return FUNCTION(a(), b()); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return FUNCTION(a(), b()); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ { \ return FUNCTION(a(), b); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return FUNCTION(a, b()); \ } @@ -272,22 +272,22 @@ namespace detail // #define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \ _GLM_SWIZZLE_TEMPLATE2 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ { \ return FUNCTION(a(), b(), c); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ { \ return FUNCTION(a(), b(), c); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ { \ return FUNCTION(a(), b, c); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + inline typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ { \ return FUNCTION(a, b(), c); \ } diff --git a/deps/glm/detail/_vectorize.hpp b/deps/glm/detail/_vectorize.hpp index 6874a321bd..9ba6f88533 100644 --- a/deps/glm/detail/_vectorize.hpp +++ b/deps/glm/detail/_vectorize.hpp @@ -36,7 +36,7 @@ #define VECTORIZE1_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec1 func( \ + inline detail::tvec1 func( \ detail::tvec1 const & v) \ { \ return detail::tvec1( \ @@ -45,7 +45,7 @@ #define VECTORIZE2_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec2 func( \ + inline detail::tvec2 func( \ detail::tvec2 const & v) \ { \ return detail::tvec2( \ @@ -55,7 +55,7 @@ #define VECTORIZE3_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec3 func( \ + inline detail::tvec3 func( \ detail::tvec3 const & v) \ { \ return detail::tvec3( \ @@ -66,7 +66,7 @@ #define VECTORIZE4_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec4 func( \ + inline detail::tvec4 func( \ detail::tvec4 const & v) \ { \ return detail::tvec4( \ @@ -84,7 +84,7 @@ #define VECTORIZE1_VEC_SCA(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec1 func \ + inline detail::tvec1 func \ ( \ detail::tvec1 const & x, \ T const & y \ @@ -96,7 +96,7 @@ #define VECTORIZE2_VEC_SCA(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec2 func \ + inline detail::tvec2 func \ ( \ detail::tvec2 const & x, \ T const & y \ @@ -109,7 +109,7 @@ #define VECTORIZE3_VEC_SCA(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec3 func \ + inline detail::tvec3 func \ ( \ detail::tvec3 const & x, \ T const & y \ @@ -123,7 +123,7 @@ #define VECTORIZE4_VEC_SCA(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec4 func \ + inline detail::tvec4 func \ ( \ detail::tvec4 const & x, \ T const & y \ @@ -144,7 +144,7 @@ #define VECTORIZE2_VEC_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec2 func \ + inline detail::tvec2 func \ ( \ detail::tvec2 const & x, \ detail::tvec2 const & y \ @@ -157,7 +157,7 @@ #define VECTORIZE3_VEC_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec3 func \ + inline detail::tvec3 func \ ( \ detail::tvec3 const & x, \ detail::tvec3 const & y \ @@ -171,7 +171,7 @@ #define VECTORIZE4_VEC_VEC(func) \ template \ - GLM_FUNC_QUALIFIER detail::tvec4 func \ + inline detail::tvec4 func \ ( \ detail::tvec4 const & x, \ detail::tvec4 const & y \ @@ -196,7 +196,7 @@ namespace detail struct If { template - static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + static inline T apply(F functor, const T& val) { return functor(val); } @@ -206,7 +206,7 @@ namespace detail struct If { template - static GLM_FUNC_QUALIFIER T apply(F, const T& val) + static inline T apply(F, const T& val) { return val; } diff --git a/deps/glm/detail/func_common.inl b/deps/glm/detail/func_common.inl index afd5afa816..d8e161760c 100644 --- a/deps/glm/detail/func_common.inl +++ b/deps/glm/detail/func_common.inl @@ -43,7 +43,7 @@ namespace detail template struct compute_abs { - GLM_FUNC_QUALIFIER static genFIType call(genFIType const & x) + inline static genFIType call(genFIType const & x) { return x >= genFIType(0) ? x : -x; } @@ -52,7 +52,7 @@ namespace detail template struct compute_abs { - GLM_FUNC_QUALIFIER static genFIType call(genFIType const & x) + inline static genFIType call(genFIType const & x) { return x; } @@ -61,7 +61,7 @@ namespace detail template class vecType> struct compute_mix_vector { - GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, vecType const & a) + inline static vecType call(vecType const & x, vecType const & y, vecType const & a) { return vecType(vecType(x) + a * vecType(y - x)); } @@ -70,7 +70,7 @@ namespace detail template class vecType> struct compute_mix_vector { - GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, vecType const & a) + inline static vecType call(vecType const & x, vecType const & y, vecType const & a) { vecType Result; for(length_t i = 0; i < x.length(); ++i) @@ -82,7 +82,7 @@ namespace detail template class vecType> struct compute_mix_scalar { - GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, U const & a) + inline static vecType call(vecType const & x, vecType const & y, U const & a) { return vecType(vecType(x) + a * vecType(y - x)); } @@ -91,7 +91,7 @@ namespace detail template class vecType> struct compute_mix_scalar { - GLM_FUNC_QUALIFIER static vecType call(vecType const & x, vecType const & y, bool const & a) + inline static vecType call(vecType const & x, vecType const & y, bool const & a) { return a ? y : x; } @@ -100,7 +100,7 @@ namespace detail template struct compute_mix { - GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a) + inline static T call(T const & x, T const & y, U const & a) { return static_cast(static_cast(x) + a * static_cast(y - x)); } @@ -109,7 +109,7 @@ namespace detail template struct compute_mix { - GLM_FUNC_QUALIFIER static T call(T const & x, T const & y, bool const & a) + inline static T call(T const & x, T const & y, bool const & a) { return a ? y : x; } @@ -118,7 +118,7 @@ namespace detail // abs template - GLM_FUNC_QUALIFIER genFIType abs + inline genFIType abs ( genFIType const & x ) @@ -131,7 +131,7 @@ namespace detail // sign //Try something like based on x >> 31 to get the sign bit template - GLM_FUNC_QUALIFIER genFIType sign + inline genFIType sign ( genFIType const & x ) @@ -147,7 +147,7 @@ namespace detail // floor template - GLM_FUNC_QUALIFIER genType floor(genType const & x) + inline genType floor(genType const & x) { return ::std::floor(x); } @@ -156,7 +156,7 @@ namespace detail // trunc template - GLM_FUNC_QUALIFIER genType trunc(genType const & x) + inline genType trunc(genType const & x) { // TODO, add C++11 std::trunk return x < 0 ? -floor(-x) : floor(x); @@ -166,7 +166,7 @@ namespace detail // round template - GLM_FUNC_QUALIFIER genType round(genType const& x) + inline genType round(genType const& x) { // TODO, add C++11 std::round return x < 0 ? genType(int(x - genType(0.5))) : genType(int(x + genType(0.5))); @@ -176,7 +176,7 @@ namespace detail // roundEven template - GLM_FUNC_QUALIFIER genType roundEven(genType const & x) + inline genType roundEven(genType const & x) { int Integer = static_cast(x); genType IntegerPart = static_cast(Integer); @@ -195,7 +195,7 @@ namespace detail // ceil template - GLM_FUNC_QUALIFIER genType ceil(genType const & x) + inline genType ceil(genType const & x) { return ::std::ceil(x); } @@ -204,7 +204,7 @@ namespace detail // fract template - GLM_FUNC_QUALIFIER genType fract + inline genType fract ( genType const & x ) @@ -216,7 +216,7 @@ namespace detail // mod template - GLM_FUNC_QUALIFIER genType mod + inline genType mod ( genType const & x, genType const & y @@ -230,7 +230,7 @@ namespace detail // modf template - GLM_FUNC_QUALIFIER genType modf + inline genType modf ( genType const & x, genType & i @@ -240,7 +240,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec2 modf + inline detail::tvec2 modf ( detail::tvec2 const & x, detail::tvec2 & i @@ -252,7 +252,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec3 modf + inline detail::tvec3 modf ( detail::tvec3 const & x, detail::tvec3 & i @@ -265,7 +265,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec4 modf + inline detail::tvec4 modf ( detail::tvec4 const & x, detail::tvec4 & i @@ -280,7 +280,7 @@ namespace detail // min template - GLM_FUNC_QUALIFIER genType min + inline genType min ( genType const & x, genType const & y @@ -294,7 +294,7 @@ namespace detail // max template - GLM_FUNC_QUALIFIER genType max + inline genType max ( genType const & x, genType const & y @@ -308,7 +308,7 @@ namespace detail // clamp template - GLM_FUNC_QUALIFIER genType clamp + inline genType clamp ( genType const & x, genType const & minVal, @@ -319,7 +319,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec2 clamp + inline detail::tvec2 clamp ( detail::tvec2 const & x, T const & minVal, @@ -332,7 +332,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec3 clamp + inline detail::tvec3 clamp ( detail::tvec3 const & x, T const & minVal, @@ -346,7 +346,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec4 clamp + inline detail::tvec4 clamp ( detail::tvec4 const & x, T const & minVal, @@ -361,7 +361,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec2 clamp + inline detail::tvec2 clamp ( detail::tvec2 const & x, detail::tvec2 const & minVal, @@ -374,7 +374,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec3 clamp + inline detail::tvec3 clamp ( detail::tvec3 const & x, detail::tvec3 const & minVal, @@ -388,7 +388,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER detail::tvec4 clamp + inline detail::tvec4 clamp ( detail::tvec4 const & x, detail::tvec4 const & minVal, @@ -403,7 +403,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType mix + inline vecType mix ( vecType const & x, vecType const & y, @@ -414,7 +414,7 @@ namespace detail } template class vecType> - GLM_FUNC_QUALIFIER vecType mix + inline vecType mix ( vecType const & x, vecType const & y, @@ -425,7 +425,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER genTypeT mix + inline genTypeT mix ( genTypeT const & x, genTypeT const & y, @@ -437,7 +437,7 @@ namespace detail // step template - GLM_FUNC_QUALIFIER genType step + inline genType step ( genType const & edge, genType const & x @@ -447,7 +447,7 @@ namespace detail } template