From b6321cb85e14a07934c368bcc1f16df1bd8c5d5d Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 23 Jul 2018 19:38:57 +0200 Subject: [PATCH] Clean up configuration defines --- glm/detail/func_common.inl | 2 +- glm/detail/func_exponential.inl | 2 +- glm/detail/func_geometric.inl | 2 +- glm/detail/func_integer.inl | 2 +- glm/detail/func_matrix.inl | 2 +- glm/detail/func_packing.inl | 2 +- glm/detail/func_trigonometric.inl | 2 +- glm/detail/func_vector_relational.inl | 2 +- glm/detail/setup.hpp | 54 ++++++++++++++++++--------- glm/detail/type_mat2x2.inl | 6 +-- glm/detail/type_mat2x3.inl | 6 +-- glm/detail/type_mat2x4.inl | 6 +-- glm/detail/type_mat3x2.inl | 6 +-- glm/detail/type_mat3x3.inl | 8 ++-- glm/detail/type_mat3x4.inl | 6 +-- glm/detail/type_mat4x2.inl | 6 +-- glm/detail/type_mat4x3.inl | 6 +-- glm/detail/type_mat4x4.inl | 8 ++-- glm/detail/type_vec1.inl | 2 +- glm/detail/type_vec2.inl | 2 +- glm/detail/type_vec3.inl | 2 +- glm/detail/type_vec4.inl | 4 +- glm/gtc/quaternion.inl | 2 +- glm/gtx/dual_quaternion.inl | 2 +- 24 files changed, 81 insertions(+), 61 deletions(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 2de9e4a2..ee0592df 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -781,6 +781,6 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_common_simd.inl" #endif diff --git a/glm/detail/func_exponential.inl b/glm/detail/func_exponential.inl index 808d6907..a847e63f 100644 --- a/glm/detail/func_exponential.inl +++ b/glm/detail/func_exponential.inl @@ -146,7 +146,7 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_exponential_simd.inl" #endif diff --git a/glm/detail/func_geometric.inl b/glm/detail/func_geometric.inl index 0408a8be..cc9e57df 100644 --- a/glm/detail/func_geometric.inl +++ b/glm/detail/func_geometric.inl @@ -242,6 +242,6 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_geometric_simd.inl" #endif diff --git a/glm/detail/func_integer.inl b/glm/detail/func_integer.inl index 6adc57d9..d02a5e1b 100644 --- a/glm/detail/func_integer.inl +++ b/glm/detail/func_integer.inl @@ -372,7 +372,7 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_integer_simd.inl" #endif diff --git a/glm/detail/func_matrix.inl b/glm/detail/func_matrix.inl index 6a0a41c5..c946f0a9 100644 --- a/glm/detail/func_matrix.inl +++ b/glm/detail/func_matrix.inl @@ -395,7 +395,7 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_matrix_simd.inl" #endif diff --git a/glm/detail/func_packing.inl b/glm/detail/func_packing.inl index 94875680..1904d968 100644 --- a/glm/detail/func_packing.inl +++ b/glm/detail/func_packing.inl @@ -184,7 +184,7 @@ namespace glm } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_packing_simd.inl" #endif diff --git a/glm/detail/func_trigonometric.inl b/glm/detail/func_trigonometric.inl index 6306456d..8571a524 100644 --- a/glm/detail/func_trigonometric.inl +++ b/glm/detail/func_trigonometric.inl @@ -194,7 +194,7 @@ namespace glm } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_trigonometric_simd.inl" #endif diff --git a/glm/detail/func_vector_relational.inl b/glm/detail/func_vector_relational.inl index ba2e06d6..7c66125a 100644 --- a/glm/detail/func_vector_relational.inl +++ b/glm/detail/func_vector_relational.inl @@ -100,6 +100,6 @@ namespace glm } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "func_vector_relational_simd.inl" #endif diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 351323dd..c71e9c2a 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -564,20 +564,6 @@ /////////////////////////////////////////////////////////////////////////////////// -#ifdef GLM_FORCE_NO_CTOR_INIT -# undef GLM_FORCE_CTOR_INIT -#endif - -#if GLM_HAS_DEFAULTED_FUNCTIONS && !defined(GLM_FORCE_CTOR_INIT) -# define GLM_USE_DEFAULTED_FUNCTIONS GLM_ENABLE -# define GLM_DEFAULT = default -#else -# define GLM_USE_DEFAULTED_FUNCTIONS GLM_DISABLE -# define GLM_DEFAULT -#endif - -/////////////////////////////////////////////////////////////////////////////////// - #ifdef GLM_FORCE_EXPLICIT_CTOR # define GLM_EXPLICIT explicit #else @@ -628,7 +614,32 @@ namespace glm #elif GLM_SETUP_INCLUDED == GLM_VERSION /////////////////////////////////////////////////////////////////////////////////// -// Enable aligned gentypes +// Configure the use of defaulted initialized types + +#define GLM_CTOR_INITIALIZER_LIST (1 << 1) +#define GLM_CTOR_INITIALISATION (1 << 2) + +#if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# define GLM_USE_CTOR_INIT GLM_CTOR_INITIALIZER_LIST +#elif defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# define GLM_USE_CTOR_INIT GLM_CTOR_INITIALISATION +#else +# define GLM_USE_CTOR_INIT GLM_DISABLE +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// Configure the use of defaulted function + +#if GLM_HAS_DEFAULTED_FUNCTIONS && GLM_USE_CTOR_INIT == GLM_DISABLE +# define GLM_USE_DEFAULTED_FUNCTIONS GLM_ENABLE +# define GLM_DEFAULT = default +#else +# define GLM_USE_DEFAULTED_FUNCTIONS GLM_DISABLE +# define GLM_DEFAULT +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// Configure the use of aligned gentypes #if defined(GLM_FORCE_ALIGNED_GENTYPES) && GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG) # define GLM_USE_ALIGNED_GENTYPES GLM_ENABLE @@ -637,9 +648,18 @@ namespace glm #endif /////////////////////////////////////////////////////////////////////////////////// -// Implementation detail +// Use SIMD instruction sets + +#if (GLM_LANG & GLM_LANG_CXXMS_FLAG) && (GLM_ARCH & GLM_ARCH_SIMD_BIT) +#define GLM_USE_SIMD GLM_ENABLE +#else +#define GLM_USE_SIMD GLM_DISABLE +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// Configure the use of anonymous structure as implementation detail -#if (((GLM_LANG & GLM_LANG_CXXMS_FLAG) && (GLM_ARCH & GLM_ARCH_SIMD_BIT)) || (GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR) || (GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE)) +#if ((GLM_USE_SIMD == GLM_ENABLE) || (GLM_SWIZZLE == GLM_SWIZZLE_OPERATOR) || (GLM_USE_ALIGNED_GENTYPES == GLM_ENABLE)) # define GLM_USE_ANONYMOUS_STRUCT GLM_ENABLE #else # define GLM_USE_ANONYMOUS_STRUCT GLM_DISABLE diff --git a/glm/detail/type_mat2x2.inl b/glm/detail/type_mat2x2.inl index d46290f5..316e3b18 100644 --- a/glm/detail/type_mat2x2.inl +++ b/glm/detail/type_mat2x2.inl @@ -7,14 +7,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 2, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0); this->value[1] = col_type(0, 1); # endif diff --git a/glm/detail/type_mat2x3.inl b/glm/detail/type_mat2x3.inl index 5580f3ae..19deae35 100644 --- a/glm/detail/type_mat2x3.inl +++ b/glm/detail/type_mat2x3.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 3, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0, 0); this->value[1] = col_type(0, 1, 0); # endif diff --git a/glm/detail/type_mat2x4.inl b/glm/detail/type_mat2x4.inl index 251d90a6..439ac1de 100644 --- a/glm/detail/type_mat2x4.inl +++ b/glm/detail/type_mat2x4.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<2, 4, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0, 0, 0); this->value[1] = col_type(0, 1, 0, 0); # endif diff --git a/glm/detail/type_mat3x2.inl b/glm/detail/type_mat3x2.inl index 53e82229..b1d1c48e 100644 --- a/glm/detail/type_mat3x2.inl +++ b/glm/detail/type_mat3x2.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 2, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1), col_type(0, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0); this->value[1] = col_type(0, 1); this->value[2] = col_type(0, 0); diff --git a/glm/detail/type_mat3x3.inl b/glm/detail/type_mat3x3.inl index a72eb6d6..ad8c96e7 100644 --- a/glm/detail/type_mat3x3.inl +++ b/glm/detail/type_mat3x3.inl @@ -7,15 +7,15 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 3, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS - this->value[0] = col_type(1, 0, 0); +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION + this->value[0] = col_type(1, 0, 0); this->value[1] = col_type(0, 1, 0); this->value[2] = col_type(0, 0, 1); # endif diff --git a/glm/detail/type_mat3x4.inl b/glm/detail/type_mat3x4.inl index 8a722ffd..dc5d6ddb 100644 --- a/glm/detail/type_mat3x4.inl +++ b/glm/detail/type_mat3x4.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<3, 4, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0, 0, 0); this->value[1] = col_type(0, 1, 0, 0); this->value[2] = col_type(0, 0, 1, 0); diff --git a/glm/detail/type_mat4x2.inl b/glm/detail/type_mat4x2.inl index 176e18fc..44fb77f7 100644 --- a/glm/detail/type_mat4x2.inl +++ b/glm/detail/type_mat4x2.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 2, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0), col_type(0, 1), col_type(0, 0), col_type(0, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0); this->value[1] = col_type(0, 1); this->value[2] = col_type(0, 0); diff --git a/glm/detail/type_mat4x3.inl b/glm/detail/type_mat4x3.inl index b7b408b5..c9f9a620 100644 --- a/glm/detail/type_mat4x3.inl +++ b/glm/detail/type_mat4x3.inl @@ -5,14 +5,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 3, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0), col_type(0, 1, 0), col_type(0, 0, 1), col_type(0, 0, 0)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0, 0); this->value[1] = col_type(0, 1, 0); this->value[2] = col_type(0, 0, 1); diff --git a/glm/detail/type_mat4x4.inl b/glm/detail/type_mat4x4.inl index d98bf3b0..99844f7a 100644 --- a/glm/detail/type_mat4x4.inl +++ b/glm/detail/type_mat4x4.inl @@ -7,14 +7,14 @@ namespace glm { // -- Constructors -- -# if !GLM_HAS_DEFAULTED_FUNCTIONS || defined(GLM_FORCE_CTOR_INIT) +# if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX14 mat<4, 4, T, Q>::mat() -# if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALIZER_LIST : value{col_type(1, 0, 0, 0), col_type(0, 1, 0, 0), col_type(0, 0, 1, 0), col_type(0, 0, 0, 1)} # endif { -# if defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS +# if GLM_USE_CTOR_INIT == GLM_CTOR_INITIALISATION this->value[0] = col_type(1, 0, 0, 0); this->value[1] = col_type(0, 1, 0, 0); this->value[2] = col_type(0, 0, 1, 0); @@ -704,6 +704,6 @@ namespace glm } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "type_mat4x4_simd.inl" #endif diff --git a/glm/detail/type_vec1.inl b/glm/detail/type_vec1.inl index 918f0616..9a3ebe9e 100644 --- a/glm/detail/type_vec1.inl +++ b/glm/detail/type_vec1.inl @@ -8,7 +8,7 @@ namespace glm # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<1, T, Q>::vec() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : x(0) # endif {} diff --git a/glm/detail/type_vec2.inl b/glm/detail/type_vec2.inl index bcd50d09..3ae7135a 100644 --- a/glm/detail/type_vec2.inl +++ b/glm/detail/type_vec2.inl @@ -10,7 +10,7 @@ namespace glm # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<2, T, Q>::vec() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : x(0), y(0) # endif {} diff --git a/glm/detail/type_vec3.inl b/glm/detail/type_vec3.inl index b01dfe75..29dc1c8a 100644 --- a/glm/detail/type_vec3.inl +++ b/glm/detail/type_vec3.inl @@ -8,7 +8,7 @@ namespace glm # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<3, T, Q>::vec() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : x(0), y(0), z(0) # endif {} diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 0422d8c3..7ca1f6db 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -161,7 +161,7 @@ namespace detail # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 vec<4, T, Q>::vec() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : x(0), y(0), z(0), w(0) # endif {} @@ -1142,6 +1142,6 @@ namespace detail } }//namespace glm -#if (GLM_ARCH & GLM_ARCH_SIMD_BIT) && (GLM_HAS_ANONYMOUS_STRUCT) +#if GLM_USE_SIMD == GLM_ENABLE # include "type_vec4_simd.inl" #endif diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 16357786..173a71d3 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -87,7 +87,7 @@ namespace detail # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tquat::tquat() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : x(0), y(0), z(0), w(1) # endif {} diff --git a/glm/gtx/dual_quaternion.inl b/glm/gtx/dual_quaternion.inl index b0dea070..58e00be5 100644 --- a/glm/gtx/dual_quaternion.inl +++ b/glm/gtx/dual_quaternion.inl @@ -27,7 +27,7 @@ namespace glm # if GLM_USE_DEFAULTED_FUNCTIONS == GLM_DISABLE template GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CXX11 tdualquat::tdualquat() -# ifdef GLM_FORCE_CTOR_INIT +# if GLM_USE_DEFAULTED_FUNCTIONS != GLM_DISABLE : real(tquat()) , dual(tquat(0, 0, 0, 0)) # endif