From dcd89bac0a2151987d5b5fb4a181ff204ab08165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 29 May 2014 22:29:34 +0200 Subject: [PATCH] Math: no need to use class here. --- src/Magnum/Math/Matrix.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/Magnum/Math/Matrix.h b/src/Magnum/Math/Matrix.h index ec8a7372b..fa05b1e1b 100644 --- a/src/Magnum/Math/Matrix.h +++ b/src/Magnum/Math/Matrix.h @@ -34,7 +34,7 @@ namespace Magnum { namespace Math { namespace Implementation { - template class MatrixDeterminant; + template struct MatrixDeterminant; } /** @@ -248,9 +248,8 @@ template inline Corrade::Utility::Debug operator<<(Co namespace Implementation { -template class MatrixDeterminant { - public: - T operator()(const Matrix& m); +template struct MatrixDeterminant { + T operator()(const Matrix& m); }; template T MatrixDeterminant::operator()(const Matrix& m) { @@ -262,18 +261,16 @@ template T MatrixDeterminant::operator()(con return out; } -template class MatrixDeterminant<2, T> { - public: - constexpr T operator()(const Matrix<2, T>& m) const { - return m[0][0]*m[1][1] - m[1][0]*m[0][1]; - } +template struct MatrixDeterminant<2, T> { + constexpr T operator()(const Matrix<2, T>& m) const { + return m[0][0]*m[1][1] - m[1][0]*m[0][1]; + } }; -template class MatrixDeterminant<1, T> { - public: - constexpr T operator()(const Matrix<1, T>& m) const { - return m[0][0]; - } +template struct MatrixDeterminant<1, T> { + constexpr T operator()(const Matrix<1, T>& m) const { + return m[0][0]; + } }; }