From f529358e9ac28b0809572c14a964ba7ba691adc4 Mon Sep 17 00:00:00 2001 From: kamilritz Date: Sat, 27 Jun 2020 09:21:21 +0200 Subject: [PATCH] Add missing const modifier --- matrix/Slice.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix/Slice.hpp b/matrix/Slice.hpp index 5157da20e6..a6e093aca8 100644 --- a/matrix/Slice.hpp +++ b/matrix/Slice.hpp @@ -184,9 +184,9 @@ public: return operator*=(Type(1) / other); } - Matrix operator*(const Type& other) + Matrix operator*(const Type& other) const { - Slice& self = *this; + const Slice& self = *this; Matrix res; for (size_t i = 0; i < P; i++) { for (size_t j = 0; j < Q; j++) { @@ -196,9 +196,9 @@ public: return res; } - Matrix operator/(const Type& other) + Matrix operator/(const Type& other) const { - Slice& self = *this; + const Slice& self = *this; return self * (Type(1) / other); }