mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +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)
|
inline Scalar& coeffRef(Index row, Index)
|
||||||
{
|
{
|
||||||
|
EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
|
||||||
return m_matrix.const_cast_derived().coeffRef(row+rowOffset(), row+colOffset());
|
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)
|
inline Scalar& coeffRef(Index index)
|
||||||
{
|
{
|
||||||
|
EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
|
||||||
return m_matrix.const_cast_derived().coeffRef(index+rowOffset(), index+colOffset());
|
return m_matrix.const_cast_derived().coeffRef(index+rowOffset(), index+colOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user