From eae48a33807b698290d0cf837d78ed879f7e027d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 15 Jul 2015 01:08:49 +0200 Subject: [PATCH] Math: simplify Quaternion default constructor. It should generate the same (constexpr) code, but this way it doesn't go through replicating the zero value four times and just zero-initializes the data array in vector. Also fixes "not a constexpr" issues with GCC 4.6 in compatibility branch (but these shouldn't be there anyway). --- src/Magnum/Math/Quaternion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index b2aa4c6f6..c7d828b58 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -197,7 +197,7 @@ template class Quaternion { * q = [\boldsymbol 0, 1] * @f] */ - constexpr /*implicit*/ Quaternion(IdentityInitT = IdentityInit): _vector{T(0)}, _scalar{T(1)} {} + constexpr /*implicit*/ Quaternion(IdentityInitT = IdentityInit): _scalar{T(1)} {} /** @brief Construct zero-initialized quaternion */ constexpr explicit Quaternion(ZeroInitT): _vector{ZeroInit}, _scalar{T{0}} {}