mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
fix const correctness in Diagonal::coeffRef (fix found by failtests)
This commit is contained in:
parent
dab4e583cb
commit
bc6625ab87
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user