mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 10:09:36 +08:00
Override MatrixBase::eval() since matrices don't need
to be evaluated, it is enough to just read them.
This commit is contained in:
parent
54238961d6
commit
574416b842
@ -336,6 +336,14 @@ class Matrix : public MatrixBase<Matrix<_Scalar, _Rows, _Cols, _MaxRows, _MaxCol
|
||||
}
|
||||
/** Destructor */
|
||||
inline ~Matrix() {}
|
||||
|
||||
/** Override MatrixBase::eval() since matrices don't need to be evaluated, it is enough to just read them.
|
||||
* This prevents a useless copy when doing e.g. "m1 = m2.eval()"
|
||||
*/
|
||||
const Matrix& eval() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user