mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Use != instead of < to check for emptiness of iterator range (fixes bug #664)
This commit is contained in:
parent
4a42843513
commit
b61facb08b
@ -941,7 +941,7 @@ void set_from_triplets(const InputIterator& begin, const InputIterator& end, Spa
|
||||
typedef typename SparseMatrixType::Scalar Scalar;
|
||||
SparseMatrix<Scalar,IsRowMajor?ColMajor:RowMajor> trMat(mat.rows(),mat.cols());
|
||||
|
||||
if(begin<end)
|
||||
if(begin!=end)
|
||||
{
|
||||
// pass 1: count the nnz per inner-vector
|
||||
VectorXi wi(trMat.outerSize());
|
||||
|
Loading…
Reference in New Issue
Block a user