From 4ca881697dfb8dfe353fad0cc86e5d90beb8bbc2 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 25 Dec 2013 16:02:00 +0100 Subject: [PATCH] Fixed build with GCC 4.7 C++11 --- glm/gtx/io.inl | 2 +- glm/gtx/simd_mat4.hpp | 2 +- glm/gtx/simd_mat4.inl | 51 +++++++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/glm/gtx/io.inl b/glm/gtx/io.inl index ebf87bad..95f17717 100644 --- a/glm/gtx/io.inl +++ b/glm/gtx/io.inl @@ -187,7 +187,7 @@ namespace detail if (cerberus) { tmat2x2 m(a); - if (io::format_guard::order_t::row_major == io::order()) { + if (io::format_guard::row_major == io::order()) { m = transpose(a); } diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index fee62522..a999ea84 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -69,7 +69,7 @@ namespace detail typedef fmat4x4SIMD type; typedef fmat4x4SIMD transpose_type; - GLM_FUNC_DECL GLM_CONSTEXPR length_t length() const; + GLM_FUNC_DECL length_t length() const; fvec4SIMD Data[4]; diff --git a/glm/gtx/simd_mat4.inl b/glm/gtx/simd_mat4.inl index 8a27b460..9cc8122d 100644 --- a/glm/gtx/simd_mat4.inl +++ b/glm/gtx/simd_mat4.inl @@ -10,11 +10,37 @@ namespace glm{ namespace detail{ -GLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t fmat4x4SIMD::length() const +GLM_FUNC_QUALIFIER length_t fmat4x4SIMD::length() const { return 4; } +////////////////////////////////////// +// Accesses + +GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] +( + length_t i +) +{ + assert(i < this->length()); + + return this->Data[i]; +} + +GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] +( + length_t i +) const +{ + assert(i < this->length()); + + return this->Data[i]; +} + +////////////////////////////////////////////////////////////// +// Constructors + GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() { #ifndef GLM_SIMD_ENABLE_DEFAULT_INIT @@ -83,29 +109,6 @@ GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD this->Data[3] = in[3]; } -////////////////////////////////////// -// Accesses - -GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] -( - length_t i -) -{ - assert(i < this->length()); - - return this->Data[i]; -} - -GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] -( - length_t i -) const -{ - assert(i < this->length()); - - return this->Data[i]; -} - ////////////////////////////////////////////////////////////// // mat4 operators