From aa6c516ec17fb44dff85b1abf3a1b05d58d3bc01 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 16 Feb 2015 13:19:05 +0100 Subject: Fix many long to int conversion warnings: - fix usage of Index (API) versus StorageIndex (when multiple indexes are stored) - use StorageIndex(val) when the input has already been check - use internal::convert_index(val) when val is potentially unsafe (directly comes from user input) --- test/sparse_basic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/sparse_basic.cpp') 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 void sparse_basic(const SparseMatrixType& re refMat.setZero(); for(Index i=0;i(0,rows-1); - StorageIndex c = internal::random(0,cols-1); + StorageIndex r = internal::random(0,StorageIndex(rows-1)); + StorageIndex c = internal::random(0,StorageIndex(cols-1)); Scalar v = internal::random(); triplets.push_back(TripletType(r,c,v)); refMat(r,c) += v; -- cgit v1.2.3