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); }