diff --git a/test/inplace_decomposition.cpp b/test/inplace_decomposition.cpp index 4900312f1..92d0d91b6 100644 --- a/test/inplace_decomposition.cpp +++ b/test/inplace_decomposition.cpp @@ -20,8 +20,8 @@ template void inplace(bool square = false, typedef Matrix RhsType; typedef Matrix ResType; - Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random(2,EIGEN_TEST_MAX_SIZE/2) : MatrixType::RowsAtCompileTime; - Index cols = MatrixType::ColsAtCompileTime==Dynamic ? (square?rows:internal::random(2,rows)) : MatrixType::ColsAtCompileTime; + Index rows = MatrixType::RowsAtCompileTime==Dynamic ? internal::random(2,EIGEN_TEST_MAX_SIZE/2) : Index(MatrixType::RowsAtCompileTime); + Index cols = MatrixType::ColsAtCompileTime==Dynamic ? (square?rows:internal::random(2,rows)) : Index(MatrixType::ColsAtCompileTime); MatrixType A = MatrixType::Random(rows,cols); RhsType b = RhsType::Random(rows);