aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index b06956974..8021f4db6 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -398,8 +398,8 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
refMat.setZero();
for(Index i=0;i<ntriplets;++i)
{
- StorageIndex r = internal::random<StorageIndex>(0,rows-1);
- StorageIndex c = internal::random<StorageIndex>(0,cols-1);
+ StorageIndex r = internal::random<StorageIndex>(0,StorageIndex(rows-1));
+ StorageIndex c = internal::random<StorageIndex>(0,StorageIndex(cols-1));
Scalar v = internal::random<Scalar>();
triplets.push_back(TripletType(r,c,v));
refMat(r,c) += v;