aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/sparse.h')
-rw-r--r--test/sparse.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sparse.h b/test/sparse.h
index 84cd695f2..860d9ad9c 100644
--- a/test/sparse.h
+++ b/test/sparse.h
@@ -79,7 +79,7 @@ initSparse(double density,
enum { IsRowMajor = SparseMatrix<Scalar,Opt2,Index>::IsRowMajor };
sparseMat.setZero();
//sparseMat.reserve(int(refMat.rows()*refMat.cols()*density));
- sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), (1.5*density)*(IsRowMajor?refMat.cols():refMat.rows())));
+ sparseMat.reserve(VectorXi::Constant(IsRowMajor ? refMat.rows() : refMat.cols(), int((1.5*density)*(IsRowMajor?refMat.cols():refMat.rows()))));
for(int j=0; j<sparseMat.outerSize(); j++)
{