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
parent
49cf0b9459
commit
2bd3c53a95
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue