Browse Source

Switch operator() to return a const reference

master
Matthias Grob 5 years ago committed by Julian Kent
parent
commit
0fd99c59f1
  1. 2
      matrix/Matrix.hpp
  2. 2
      matrix/Slice.hpp
  3. 2
      matrix/Vector.hpp

2
matrix/Matrix.hpp

@ -94,7 +94,7 @@ public: @@ -94,7 +94,7 @@ public:
*/
inline Type operator()(size_t i, size_t j) const
inline const Type &operator()(size_t i, size_t j) const
{
assert(i >= 0);
assert(i < M);

2
matrix/Slice.hpp

@ -34,7 +34,7 @@ public: @@ -34,7 +34,7 @@ public:
assert(y0 + Q <= N);
}
Type operator()(size_t i, size_t j) const
const Type &operator()(size_t i, size_t j) const
{
assert(i >= 0);
assert(i < P);

2
matrix/Vector.hpp

@ -40,7 +40,7 @@ public: @@ -40,7 +40,7 @@ public:
{
}
inline Type operator()(size_t i) const
inline const Type &operator()(size_t i) const
{
assert(i >= 0);
assert(i < M);

Loading…
Cancel
Save