Add missing const modifier

This commit is contained in:
kamilritz 2020-06-27 09:21:21 +02:00 committed by Matthias Grob
parent 674bd99f3b
commit f529358e9a
1 changed files with 4 additions and 4 deletions

View File

@ -184,9 +184,9 @@ public:
return operator*=(Type(1) / other);
}
Matrix<Type, P, Q> operator*(const Type& other)
Matrix<Type, P, Q> operator*(const Type& other) const
{
Slice<Type, P, Q, M, N>& self = *this;
const Slice<Type, P, Q, M, N>& self = *this;
Matrix<Type, P, Q> 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<Type, P, Q> operator/(const Type& other)
Matrix<Type, P, Q> operator/(const Type& other) const
{
Slice<Type, P, Q, M, N>& self = *this;
const Slice<Type, P, Q, M, N>& self = *this;
return self * (Type(1) / other);
}