diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-09-11 00:03:07 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-09-11 00:03:07 +0200 |
commit | afa8d1353221d5e89c555881b5d62f153e66211f (patch) | |
tree | 8f7d5f947ac893b67a1bfcff5ac2aa98ae229330 /Eigen/src/SparseCore | |
parent | c06e6fd115d747c42a2b2ea029c53bbdf41276d6 (diff) |
Fix some implicit literal to Scalar conversions in SparseCore
Diffstat (limited to 'Eigen/src/SparseCore')
-rw-r--r-- | Eigen/src/SparseCore/SparseCwiseBinaryOp.h | 2 | ||||
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h index c41c07af1..6130bab43 100644 --- a/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +++ b/Eigen/src/SparseCore/SparseCwiseBinaryOp.h @@ -101,7 +101,7 @@ public: } else { - m_value = 0; // this is to avoid a compilation warning + m_value = Scalar(0); // this is to avoid a compilation warning m_id = -1; } return *this; diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 63dd1cc32..e0910a2cb 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -1341,7 +1341,7 @@ typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Sca } m_data.index(p) = convert_index(inner); - return (m_data.value(p) = 0); + return (m_data.value(p) = Scalar(0)); } if(m_data.size() != m_data.allocatedSize()) |