Fix more gcc compiler warnings / sort-of bugs

This commit is contained in:
Charles Schlosser
2023-07-14 21:12:45 +00:00
parent 21cd3fe209
commit 81fe2d424f
5 changed files with 24 additions and 16 deletions

View File

@@ -40,14 +40,14 @@ template <typename MatrixType>
std::enable_if_t<((MatrixType::Flags&RowMajorBit)==0),void>
check_left_top(const MatrixType& m, Index r, Index c,
Index rows, Index /*unused*/) {
VERIFY_IS_EQUAL(m.leftCols(c).coeff(r+c*rows), m(r,c));
if(c > 0) VERIFY_IS_EQUAL(m.leftCols(c).coeff(r+c*rows), m(r,c));
}
template <typename MatrixType>
std::enable_if_t<((MatrixType::Flags&RowMajorBit)!=0),void>
check_left_top(const MatrixType& m, Index r, Index c,
Index /*unused*/, Index cols) {
VERIFY_IS_EQUAL(m.topRows(r).coeff(c+r*cols), m(r,c));
if(r > 0) VERIFY_IS_EQUAL(m.topRows(r).coeff(c+r*cols), m(r,c));
}
template<typename MatrixType> void block(const MatrixType& m)