From 1d3743d2c5f4ce69da39d9ecc7fb388997e1091a Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 30 Sep 2007 20:23:24 +0000 Subject: [PATCH] for dynamic size matrix (Rows|Cols)AtCompileTime is always EiDynamic and not "(Rows|Cols)AtCompileTime - 1" which would be EiDynamic - 1 == -2 --- src/internal/Minor.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/internal/Minor.h b/src/internal/Minor.h index 1a1a15242..08086bbcc 100644 --- a/src/internal/Minor.h +++ b/src/internal/Minor.h @@ -36,8 +36,11 @@ template class EiMinor typedef EiMinor Ref; typedef EiMinor ConstRef; - static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime - 1, - ColsAtCompileTime = MatrixType::ColsAtCompileTime - 1; + static const int + RowsAtCompileTime = (MatrixType::RowsAtCompileTime != EiDynamic) ? + MatrixType::RowsAtCompileTime - 1 : EiDynamic, + ColsAtCompileTime = (MatrixType::ColsAtCompileTime != EiDynamic) ? + MatrixType::ColsAtCompileTime - 1 : EiDynamic; EiMinor(const MatRef& matrix, int row, int col = 0)