From 2423d607fe07c6edfa8a28efe6d50fdd496fc4b7 Mon Sep 17 00:00:00 2001 From: Christophe Date: Fri, 12 Jul 2019 22:11:42 +0200 Subject: [PATCH] Fixed GCC warning about member initialization order --- glm/detail/type_quat.inl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/glm/detail/type_quat.inl b/glm/detail/type_quat.inl index 041793df..6aba9218 100644 --- a/glm/detail/type_quat.inl +++ b/glm/detail/type_quat.inl @@ -90,32 +90,32 @@ namespace detail template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua() # if GLM_CONFIG_CTOR_INIT != GLM_CTOR_INIT_DISABLE - : x(0), y(0), z(0), w(1) + : w(1), x(0), y(0), z(0) # endif {} template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(qua const& q) - : x(q.x), y(q.y), z(q.z), w(q.w) + : w(q.w), x(q.x), y(q.y), z(q.z) {} # endif template template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(qua const& q) - : x(q.x), y(q.y), z(q.z), w(q.w) + : w(q.w), x(q.x), y(q.y), z(q.z) {} // -- Explicit basic constructors -- template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(T s, vec<3, T, Q> const& v) - : x(v.x), y(v.y), z(v.z), w(s) + : w(s), x(v.x), y(v.y), z(v.z) {} template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(T _w, T _x, T _y, T _z) - : x(_x), y(_y), z(_z), w(_w) + : w(_w), x(_x), y(_y), z(_z) {} // -- Conversion constructors -- @@ -123,10 +123,10 @@ namespace detail template template GLM_FUNC_QUALIFIER GLM_CONSTEXPR qua::qua(qua const& q) - : x(static_cast(q.x)) + : w(static_cast(q.w)) + , x(static_cast(q.x)) , y(static_cast(q.y)) , z(static_cast(q.z)) - , w(static_cast(q.w)) {} //template