From 5bbe3df0ef7fcce80a1ad9b9a583a4ea39c87384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 3 Jul 2013 19:27:31 +0200 Subject: [PATCH] Math: use both const and constexpr. Spotted by Clang. --- src/Math/Matrix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index e5db427ea..badd940a4 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -254,14 +254,14 @@ template T MatrixDeterminant::operator()(con template class MatrixDeterminant<2, T> { public: - constexpr T operator()(const Matrix<2, T>& m) { + 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) { + constexpr T operator()(const Matrix<1, T>& m) const { return m[0][0]; } };