aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/zerosized.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-02-06 20:26:59 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-02-06 20:26:59 +0100
commit8e599bc098cef7030004489dca2b9dab920f2cc8 (patch)
treec62320aa994075a0345285beedd86e543e9de0a5 /test/zerosized.cpp
parentc6a12d1dc61cb38f5c9d48241d30cd99c9b99fd2 (diff)
Fix warning in unit test
Diffstat (limited to 'test/zerosized.cpp')
-rw-r--r--test/zerosized.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/zerosized.cpp b/test/zerosized.cpp
index 85c553453..2404fdc2b 100644
--- a/test/zerosized.cpp
+++ b/test/zerosized.cpp
@@ -49,8 +49,8 @@ template<typename MatrixType> void zeroSizedMatrix()
if(MatrixType::MaxColsAtCompileTime!=0 && MatrixType::MaxRowsAtCompileTime!=0)
{
- Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : MatrixType::RowsAtCompileTime;
- Index cols = MatrixType::ColsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : MatrixType::ColsAtCompileTime;
+ Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : Index(MatrixType::RowsAtCompileTime);
+ Index cols = MatrixType::ColsAtCompileTime==Dynamic ? internal::random<Index>(1,10) : Index(MatrixType::ColsAtCompileTime);
MatrixType m(rows,cols);
zeroReduction(m.template block<0,MatrixType::ColsAtCompileTime>(0,0,0,cols));
zeroReduction(m.template block<MatrixType::RowsAtCompileTime,0>(0,0,rows,0));