aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Michael Olbrich <michael.olbrich@gmx.net>2007-09-30 20:23:24 +0000
committerGravatar Michael Olbrich <michael.olbrich@gmx.net>2007-09-30 20:23:24 +0000
commit1d3743d2c5f4ce69da39d9ecc7fb388997e1091a (patch)
treeb4f5727c0cc18a10bc1465d0fb59ed080cc219a0
parent4241dddee9835140a4fd894434b30e42e16f47a2 (diff)
for dynamic size matrix (Rows|Cols)AtCompileTime is always EiDynamic and not
"(Rows|Cols)AtCompileTime - 1" which would be EiDynamic - 1 == -2
-rw-r--r--src/internal/Minor.h7
1 files 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<typename MatrixType> 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)