fix warnings. The one in Reverse was potentially serious: coeff() methods should return CoeffReturnType, not "Scalar", if the expression is potentially a Lvalue.

This commit is contained in:
Benoit Jacob
2010-08-03 10:38:48 -04:00
parent cc25edd5de
commit d90d7a006f
2 changed files with 7 additions and 4 deletions

View File

@@ -126,13 +126,13 @@ template<typename MatrixType, int Direction> class Reverse
ReverseCol ? m_matrix.cols() - col - 1 : col);
}
inline const Scalar coeff(Index row, Index col) const
inline CoeffReturnType coeff(Index row, Index col) const
{
return m_matrix.coeff(ReverseRow ? m_matrix.rows() - row - 1 : row,
ReverseCol ? m_matrix.cols() - col - 1 : col);
}
inline const Scalar coeff(Index index) const
inline CoeffReturnType coeff(Index index) const
{
return m_matrix.coeff(m_matrix.size() - index - 1);
}