From 36457178f9d12481e699d07c0ac8d25a7e6a854f Mon Sep 17 00:00:00 2001 From: Igor Krivenko Date: Fri, 9 Dec 2011 23:38:41 +0100 Subject: bug #352:properly cast constants --- Eigen/src/SparseCore/SparseRedux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/SparseCore/SparseRedux.h') diff --git a/Eigen/src/SparseCore/SparseRedux.h b/Eigen/src/SparseCore/SparseRedux.h index afc49de7a..41993e5c6 100644 --- a/Eigen/src/SparseCore/SparseRedux.h +++ b/Eigen/src/SparseCore/SparseRedux.h @@ -30,7 +30,7 @@ typename internal::traits::Scalar SparseMatrixBase::sum() const { eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix"); - Scalar res = 0; + Scalar res(0); for (Index j=0; j