aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseDot.h
diff options
context:
space:
mode:
authorGravatar Igor Krivenko <anonymous@invalid.net>2011-12-09 23:38:41 +0100
committerGravatar Igor Krivenko <anonymous@invalid.net>2011-12-09 23:38:41 +0100
commit36457178f9d12481e699d07c0ac8d25a7e6a854f (patch)
treee9b12b3ed7e4102fcf1d0c4384fec3c1d4c94f37 /Eigen/src/SparseCore/SparseDot.h
parentd400a6245ec0d86b0e3dd2af30e49349ae28b0f0 (diff)
bug #352:properly cast constants
Diffstat (limited to 'Eigen/src/SparseCore/SparseDot.h')
-rw-r--r--Eigen/src/SparseCore/SparseDot.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseDot.h b/Eigen/src/SparseCore/SparseDot.h
index 1f10f71a4..132bb47f3 100644
--- a/Eigen/src/SparseCore/SparseDot.h
+++ b/Eigen/src/SparseCore/SparseDot.h
@@ -40,7 +40,7 @@ SparseMatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const
eigen_assert(other.size()>0 && "you are using a non initialized vector");
typename Derived::InnerIterator i(derived(),0);
- Scalar res = 0;
+ Scalar res(0);
while (i)
{
res += internal::conj(i.value()) * other.coeff(i.index());
@@ -64,7 +64,7 @@ SparseMatrixBase<Derived>::dot(const SparseMatrixBase<OtherDerived>& other) cons
typename Derived::InnerIterator i(derived(),0);
typename OtherDerived::InnerIterator j(other.derived(),0);
- Scalar res = 0;
+ Scalar res(0);
while (i && j)
{
if (i.index()==j.index())