Use != instead of < to check for emptiness of iterator range (fixes bug #664)

This commit is contained in:
Christoph Hertzberg 2013-10-16 13:10:15 +02:00
parent 4a42843513
commit b61facb08b

View File

@ -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());