diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-10-11 14:45:50 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2021-10-13 04:33:21 +0200 |
commit | 2bd3c53a9586f37311e4f860685839b127cc9308 (patch) | |
tree | f96aa40b1a348bf244cc97a2060c552d4af95705 /src/tools | |
parent | 49cf0b94597ce41484c130c3d3666de9e25cfe30 (diff) |
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>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qlalr/compress.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qlalr/compress.cpp b/src/tools/qlalr/compress.cpp index 18f9fb4b58..054766671f 100644 --- a/src/tools/qlalr/compress.cpp +++ b/src/tools/qlalr/compress.cpp @@ -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; |