This commit is contained in:
Gael Guennebaud 2018-10-15 09:22:27 +02:00
commit 3a33db4de5
2 changed files with 4 additions and 3 deletions

View File

@ -893,7 +893,7 @@ public:
Index p = m_outerIndex[outer] + m_innerNonZeros[outer]++;
m_data.index(p) = convert_index(inner);
return (m_data.value(p) = 0);
return (m_data.value(p) = Scalar(0));
}
private:
@ -1274,7 +1274,7 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar&
m_innerNonZeros[outer]++;
m_data.index(p) = inner;
return (m_data.value(p) = 0);
return (m_data.value(p) = Scalar(0));
}
template<typename _Scalar, int _Options, typename _StorageIndex>
@ -1381,7 +1381,7 @@ EIGEN_DONT_INLINE typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar&
}
m_data.index(p) = inner;
return (m_data.value(p) = 0);
return (m_data.value(p) = Scalar(0));
}
namespace internal {

View File

@ -645,6 +645,7 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
template<typename SparseMatrixType>
void big_sparse_triplet(Index rows, Index cols, double density) {
g_dense_op_sparse_count = 0; // Suppresses compiler warning.
typedef typename SparseMatrixType::StorageIndex StorageIndex;
typedef typename SparseMatrixType::Scalar Scalar;
typedef Triplet<Scalar,Index> TripletType;