mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -126,13 +126,13 @@ template<typename MatrixType, int Direction> class Reverse
|
|||||||
ReverseCol ? m_matrix.cols() - col - 1 : col);
|
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,
|
return m_matrix.coeff(ReverseRow ? m_matrix.rows() - row - 1 : row,
|
||||||
ReverseCol ? m_matrix.cols() - col - 1 : col);
|
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);
|
return m_matrix.coeff(m_matrix.size() - index - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,8 +63,11 @@ EIGEN_DONT_INLINE static void run(
|
|||||||
Index rows, Index cols,
|
Index rows, Index cols,
|
||||||
const LhsScalar* lhs, Index lhsStride,
|
const LhsScalar* lhs, Index lhsStride,
|
||||||
const RhsScalar* rhs, Index rhsIncr,
|
const RhsScalar* rhs, Index rhsIncr,
|
||||||
ResScalar* res, Index resIncr,
|
ResScalar* res, Index
|
||||||
RhsScalar alpha)
|
#ifdef EIGEN_INTERNAL_DEBUGGING
|
||||||
|
resIncr
|
||||||
|
#endif
|
||||||
|
, RhsScalar alpha)
|
||||||
{
|
{
|
||||||
ei_internal_assert(resIncr==1);
|
ei_internal_assert(resIncr==1);
|
||||||
#ifdef _EIGEN_ACCUMULATE_PACKETS
|
#ifdef _EIGEN_ACCUMULATE_PACKETS
|
||||||
|
|||||||
Reference in New Issue
Block a user