summaryrefslogtreecommitdiffstats
path: root/util/lexgen
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-06-20 17:40:45 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-06-29 21:58:36 +0200
commitff2b2032a089d74975da4a3fac7c7c90989e6dc5 (patch)
tree2c2930d5e38fb3f94a936e5a0c8bc2c4e5259dbb /util/lexgen
parentfabf9239e0e6231f09d4a324bfe85ffcc529da3d (diff)
Remove usages of deprecated APIs from QtAlgorithms
Task-number: QTBUG-76491 Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'util/lexgen')
-rw-r--r--util/lexgen/generator.cpp6
-rw-r--r--util/lexgen/nfa.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp
index 481d586e73..3b966e025b 100644
--- a/util/lexgen/generator.cpp
+++ b/util/lexgen/generator.cpp
@@ -183,7 +183,7 @@ Generator::Generator(const DFA &_dfa, const Config &config)
: dfa(_dfa), cfg(config)
{
QList<InputType> lst = cfg.maxInputSet.toList();
- qSort(lst);
+ std::sort(lst.begin(), lst.end());
minInput = lst.first();
maxInput = lst.last();
@@ -230,7 +230,7 @@ static QVector<Generator::TransitionSequence> convertToSequences(const Transitio
return sequences;
QList<InputType> keys = transitions.keys();
- qSort(keys);
+ std::sort(keys.begin(), keys.end());
int i = 0;
Generator::TransitionSequence sequence;
sequence.first = keys.at(0);
@@ -359,7 +359,7 @@ void Generator::generateTransitions(CodeBlock &body, const TransitionMap &transi
}
} else {
QList<InputType> keys = transitions.keys();
- qSort(keys);
+ std::sort(keys.begin(), keys.end());
body << "switch (ch.unicode()) {";
body.indent();
diff --git a/util/lexgen/nfa.cpp b/util/lexgen/nfa.cpp
index 9047a17fde..f6e3a5c355 100644
--- a/util/lexgen/nfa.cpp
+++ b/util/lexgen/nfa.cpp
@@ -384,7 +384,7 @@ QSet<int> NFA::epsilonClosure(const QSet<int> &initialClosure) const
QStack<int> stateStack;
stateStack.resize(closure.count());
- qCopy(closure.constBegin(), closure.constEnd(), stateStack.begin());
+ std::copy(closure.constBegin(), closure.constEnd(), stateStack.begin());
while (!stateStack.isEmpty()) {
int t = stateStack.pop();