From d9cce5d7ce1f8a37dc1d52ec7ea7dbb9c4f3e712 Mon Sep 17 00:00:00 2001 From: Lynix Date: Tue, 29 Jul 2014 10:30:49 +0200 Subject: [PATCH] Fixed compilation error Former-commit-id: febc503b22cedaa4edf0efe3677cf38a205d7230 --- include/Nazara/Math/Matrix4.inl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/Nazara/Math/Matrix4.inl b/include/Nazara/Math/Matrix4.inl index baab59da6..a3fe4b53a 100644 --- a/include/Nazara/Math/Matrix4.inl +++ b/include/Nazara/Math/Matrix4.inl @@ -150,16 +150,16 @@ NzVector4 NzMatrix4::GetColumn(unsigned int column) const ///FIXME: Est-ce une bonne idée de gérer la matrice de cette façon ? #if NAZARA_MATH_SAFE - if (row > 3) + if (column > 3) { NzStringStream ss; - ss << "Row out of range: (" << row << ") > 3"; + ss << "Row out of range: (" << column << ") > 3"; throw std::out_of_range(ss.ToString()); } #endif - T* ptr = (&m11) + row*4; + T* ptr = (&m11) + column*4; return NzVector4(ptr); } @@ -469,17 +469,17 @@ NzVector4 NzMatrix4::GetRow(unsigned int row) const ///FIXME: Est-ce une bonne idée de gérer la matrice de cette façon ? #if NAZARA_MATH_SAFE - if (column > 3) + if (row > 3) { NzStringStream ss; - ss << "Column out of range: (" << column << ") > 3"; + ss << "Column out of range: (" << row << ") > 3"; throw std::out_of_range(ss.ToString()); } #endif T* ptr = &m11; - return NzVector4(ptr[column], ptr[column+4], ptr[column+8], ptr[column+12]); + return NzVector4(ptr[row], ptr[row+4], ptr[row+8], ptr[row+12]); } template