summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-10-11 14:45:50 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2021-10-13 04:33:21 +0200
commit2bd3c53a9586f37311e4f860685839b127cc9308 (patch)
treef96aa40b1a348bf244cc97a2060c552d4af95705
parent49cf0b94597ce41484c130c3d3666de9e25cfe30 (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>
-rw-r--r--src/tools/qlalr/compress.cpp4
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;