From cbcb73a9d518a9c16b5e4341ace5e44b8b4fd519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 20 Mar 2013 12:56:38 +0100 Subject: [PATCH] GCC 4.5 compatibility: this workaround is not needed anymore. Due to Matrix/Vector rework and other changes this is fixed on lower levels already. The tests pass on both 4.5 and 4.4, hopefully it won't break anywhere else. --- src/Math/Matrix4.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 2346b2e77..0ebebff4b 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -303,15 +303,9 @@ template class Matrix4: public Matrix<4, T> { */ inline constexpr Matrix<3, T> rotationScaling() const { /* Not Matrix3, because it is for affine 2D transformations */ - #ifndef CORRADE_GCC45_COMPATIBILITY /* GCC 4.5 badly optimizes this */ return {(*this)[0].xyz(), (*this)[1].xyz(), (*this)[2].xyz()}; - #else - return {Vector3((*this)[0][0], (*this)[0][1], (*this)[0][2]), - Vector3((*this)[1][0], (*this)[1][1], (*this)[1][2]), - Vector3((*this)[2][0], (*this)[2][1], (*this)[2][2])}; - #endif } /** @@ -324,15 +318,9 @@ template class Matrix4: public Matrix<4, T> { */ inline Matrix<3, T> rotation() const { /* Not Matrix3, because it is for affine 2D transformations */ - #ifndef CORRADE_GCC45_COMPATIBILITY /* GCC 4.5 badly optimizes this */ return {(*this)[0].xyz().normalized(), (*this)[1].xyz().normalized(), (*this)[2].xyz().normalized()}; - #else - return {Vector3((*this)[0][0], (*this)[0][1], (*this)[0][2]).normalized(), - Vector3((*this)[1][0], (*this)[1][1], (*this)[1][2]).normalized(), - Vector3((*this)[2][0], (*this)[2][1], (*this)[2][2]).normalized()}; - #endif } /** @todo uniform scaling extraction */