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<StorageIndex>(val) when val is potentially unsafe (directly comes from user input)
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index b069569..8021f4d 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -398,8 +398,8 @@
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;