QLalr: use QList iterators in algorithms

There's no need to dereference+reference a QList's iterator
only to pass the result to an algorithm, just pass the iterator.

Change-Id: I7367010f6ab489d951715259bd51aeec790d3c84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Giuseppe D'Angelo 2021-10-11 14:45:50 +02:00
parent 49cf0b9459
commit 2bd3c53a95
1 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ void Compress::operator () (int *table, int row_count, int column_count)
if (pos == info.begin ())
{
// try to find a perfect match
QList<int>::iterator pm = std::search(&*pos, &*info.end(), row.beginNonZeros(),
QList<int>::iterator pm = std::search(pos, info.end(), row.beginNonZeros(),
row.endNonZeros(), _PerfectMatch());
if (pm != info.end ())
@ -196,7 +196,7 @@ void Compress::operator () (int *table, int row_count, int column_count)
}
}
pos = std::search (&*pos, &*info.end (), row.beginNonZeros (), row.endNonZeros (), _Fit ());
pos = std::search (pos, info.end (), row.beginNonZeros (), row.endNonZeros (), _Fit ());
if (pos == info.end ())
break;