diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index 5baa1ff34..779c90f9f 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -142,9 +142,8 @@ template class Matrix { /** @brief Equality operator */ inline bool operator==(const Matrix& other) const { - for(size_t row = 0; row != size; ++row) - for(size_t col = 0; col != size; ++col) - if(!TypeTraits::equals((*this)[col][row], other[col][row])) return false; + for(size_t i = 0; i != size*size; ++i) + if(!TypeTraits::equals(_data[i], other._data[i])) return false; return true; }