fix const correctness in Diagonal::coeffRef (fix found by failtests)

This commit is contained in:
Benoit Jacob 2011-02-06 11:57:04 -05:00
parent dab4e583cb
commit bc6625ab87

View File

@ -103,6 +103,7 @@ template<typename MatrixType, int DiagIndex> class Diagonal
inline Scalar& coeffRef(Index row, Index)
{
EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
return m_matrix.const_cast_derived().coeffRef(row+rowOffset(), row+colOffset());
}
@ -118,6 +119,7 @@ template<typename MatrixType, int DiagIndex> class Diagonal
inline Scalar& coeffRef(Index index)
{
EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
return m_matrix.const_cast_derived().coeffRef(index+rowOffset(), index+colOffset());
}