aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_basic.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-07-12 16:40:02 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-07-12 16:40:02 +0200
commit7ee378d89da93d2556ba000f59783c4c0e32e9a0 (patch)
tree4223aa456491464498382673b47edda0b5891fe9 /test/sparse_basic.cpp
parent61c3f55362969ca20d88120f0ca226d3c23668d8 (diff)
Fix various scalar type conversion warnings.
Diffstat (limited to 'test/sparse_basic.cpp')
-rw-r--r--test/sparse_basic.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/sparse_basic.cpp b/test/sparse_basic.cpp
index d466b51da..498ecfe29 100644
--- a/test/sparse_basic.cpp
+++ b/test/sparse_basic.cpp
@@ -449,12 +449,12 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
// test conservative resize
{
- std::vector< std::pair<int,int> > inc;
- inc.push_back(std::pair<int,int>(-3,-2));
- inc.push_back(std::pair<int,int>(0,0));
- inc.push_back(std::pair<int,int>(3,2));
- inc.push_back(std::pair<int,int>(3,0));
- inc.push_back(std::pair<int,int>(0,3));
+ std::vector< std::pair<Index,Index> > inc;
+ inc.push_back(std::pair<Index,Index>(-3,-2));
+ inc.push_back(std::pair<Index,Index>(0,0));
+ inc.push_back(std::pair<Index,Index>(3,2));
+ inc.push_back(std::pair<Index,Index>(3,0));
+ inc.push_back(std::pair<Index,Index>(0,3));
for(size_t i = 0; i< inc.size(); i++) {
Index incRows = inc[i].first;
@@ -472,9 +472,9 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
// Insert new values
if (incRows > 0)
- m1.insert(refMat1.rows()-1, 0) = refMat1(refMat1.rows()-1, 0) = 1;
+ m1.insert(m1.rows()-1, 0) = refMat1(refMat1.rows()-1, 0) = 1;
if (incCols > 0)
- m1.insert(0, refMat1.cols()-1) = refMat1(0, refMat1.cols()-1) = 1;
+ m1.insert(0, m1.cols()-1) = refMat1(0, refMat1.cols()-1) = 1;
VERIFY_IS_APPROX(m1, refMat1);