diff --git a/glm/detail/type_mat2x2.hpp b/glm/detail/type_mat2x2.hpp index 7ebf1e66..8d40179e 100644 --- a/glm/detail/type_mat2x2.hpp +++ b/glm/detail/type_mat2x2.hpp @@ -98,13 +98,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); -# else - template - GLM_FUNC_DECL tmat2x2(tmat2x2 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x2(tmat2x2 const & m); GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); diff --git a/glm/detail/type_mat2x3.hpp b/glm/detail/type_mat2x3.hpp index 51a1a862..d079e222 100644 --- a/glm/detail/type_mat2x3.hpp +++ b/glm/detail/type_mat2x3.hpp @@ -94,13 +94,8 @@ namespace glm ////////////////////////////////////// // Matrix conversion -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); -# else - template - GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x3(tmat2x3 const & m); GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); diff --git a/glm/detail/type_mat2x4.hpp b/glm/detail/type_mat2x4.hpp index 9f776899..9ff28845 100644 --- a/glm/detail/type_mat2x4.hpp +++ b/glm/detail/type_mat2x4.hpp @@ -95,13 +95,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); -# else - template - GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat2x4(tmat2x4 const & m); GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); diff --git a/glm/detail/type_mat3x2.hpp b/glm/detail/type_mat3x2.hpp index 5bbeed79..b02e61aa 100644 --- a/glm/detail/type_mat3x2.hpp +++ b/glm/detail/type_mat3x2.hpp @@ -101,13 +101,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); -# else - template - GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x2(tmat3x2 const & m); GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); diff --git a/glm/detail/type_mat3x3.hpp b/glm/detail/type_mat3x3.hpp index 83b18efb..d9b1105a 100644 --- a/glm/detail/type_mat3x3.hpp +++ b/glm/detail/type_mat3x3.hpp @@ -105,13 +105,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); -# else - template - GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x3(tmat3x3 const & m); GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); diff --git a/glm/detail/type_mat3x4.hpp b/glm/detail/type_mat3x4.hpp index d894c9ee..409c8364 100644 --- a/glm/detail/type_mat3x4.hpp +++ b/glm/detail/type_mat3x4.hpp @@ -100,13 +100,8 @@ namespace glm ////////////////////////////////////// // Matrix conversion -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); -# else - template - GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat3x4(tmat3x4 const & m); GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); diff --git a/glm/detail/type_mat4x2.hpp b/glm/detail/type_mat4x2.hpp index 95b7d3dc..951c6370 100644 --- a/glm/detail/type_mat4x2.hpp +++ b/glm/detail/type_mat4x2.hpp @@ -106,13 +106,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); -# else - template - GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x2(tmat4x2 const & m); GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); diff --git a/glm/detail/type_mat4x3.hpp b/glm/detail/type_mat4x3.hpp index cab8872c..4433409c 100644 --- a/glm/detail/type_mat4x3.hpp +++ b/glm/detail/type_mat4x3.hpp @@ -105,13 +105,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); -# else - template - GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x3(tmat4x3 const & m); GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); diff --git a/glm/detail/type_mat4x4.hpp b/glm/detail/type_mat4x4.hpp index f34d8fe8..de702383 100644 --- a/glm/detail/type_mat4x4.hpp +++ b/glm/detail/type_mat4x4.hpp @@ -110,13 +110,8 @@ namespace glm ////////////////////////////////////// // Matrix conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); -# else - template - GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tmat4x4(tmat4x4 const & m); GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); diff --git a/glm/detail/type_vec1.hpp b/glm/detail/type_vec1.hpp index c1cfea25..6a5e6972 100644 --- a/glm/detail/type_vec1.hpp +++ b/glm/detail/type_vec1.hpp @@ -136,15 +136,9 @@ namespace glm template GLM_FUNC_DECL explicit tvec1(tvec4 const & v); -# ifdef GLM_FORCE_EXPLICIT_CTOR - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec1(tvec1 const & v); -# else - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL tvec1(tvec1 const & v); -# endif + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec1(tvec1 const & v); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index b328e88a..f15cd200 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -144,15 +144,9 @@ namespace glm template GLM_FUNC_DECL explicit tvec2(tvec4 const & v); -# ifdef GLM_FORCE_EXPLICIT_CTOR - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2(tvec2 const & v); -# else - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL tvec2(tvec2 const & v); -# endif + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec2(tvec2 const & v); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 0fcee272..39c9384b 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -154,15 +154,9 @@ namespace glm template GLM_FUNC_DECL explicit tvec3(tvec4 const & v); -# ifdef GLM_FORCE_EXPLICIT_CTOR - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3(tvec3 const & v); -# else - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL tvec3(tvec3 const & v); -# endif + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec3(tvec3 const & v); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 265f9dae..d61cd8ea 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -229,16 +229,10 @@ namespace detail //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) template GLM_FUNC_DECL explicit tvec4(tvec2 const & a, tvec2 const & b); - -# ifdef GLM_FORCE_EXPLICIT_CTOR - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec4 const & v); -# else - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL tvec4(tvec4 const & v); -# endif + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tvec4(tvec4 const & v); ////////////////////////////////////// // Swizzle constructors diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 4be2782e..18aa963c 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -108,24 +108,19 @@ namespace glm GLM_FUNC_DECL tquat(T const & w, T const & x, T const & y, T const & z); ////////////////////////////////////// - // Convertions + // Conversions + + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tquat(tquat const & q); -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tquat(tquat const & q); -# else - template - GLM_FUNC_DECL tquat(tquat const & q); -# endif - // explicit conversion operators # if GLM_HAS_EXPLICIT_CONVERSION_OPERATORS GLM_FUNC_DECL explicit operator tmat3x3(); GLM_FUNC_DECL explicit operator tmat4x4(); # endif - + /// Create a quaternion from two normalized axis - /// + /// /// @param u A first normalized axis /// @param v A second normalized axis /// @see gtc_quaternion diff --git a/glm/gtx/dual_quaternion.hpp b/glm/gtx/dual_quaternion.hpp index 3b5c87b4..5faad6a1 100644 --- a/glm/gtx/dual_quaternion.hpp +++ b/glm/gtx/dual_quaternion.hpp @@ -110,13 +110,8 @@ namespace glm ////////////////////////////////////////////////////////////// // tdualquat conversions -# ifdef GLM_FORCE_EXPLICIT_CTOR - template - GLM_FUNC_DECL explicit tdualquat(tdualquat const & q); -# else - template - GLM_FUNC_DECL tdualquat(tdualquat const & q); -# endif + template + GLM_FUNC_DECL GLM_EXPLICIT_CTOR_MAYBE tdualquat(tdualquat const & q); GLM_FUNC_DECL explicit tdualquat(tmat2x4 const & holder_mat); GLM_FUNC_DECL explicit tdualquat(tmat3x4 const & aug_mat);