From 1307bf289212632a7a2913a4d1c917af8b63d1d5 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 2 May 2019 19:28:38 +0200 Subject: qlalr: replace a QMap-wrapping OrderedSet with std::set Why roll your own if you can use the original. The clone was even designed to be API-compatible with std::set, so porting is trivial, except for the unholy int/size_t mismatch, which requires a few casts. Change-Id: Ieb99cbc019ef387c6901d7518d1e79585169b638 Reviewed-by: Giuseppe D'Angelo --- src/tools/qlalr/lalr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/qlalr/lalr.cpp') diff --git a/src/tools/qlalr/lalr.cpp b/src/tools/qlalr/lalr.cpp index 2a82eb154e..8af3b3c0db 100644 --- a/src/tools/qlalr/lalr.cpp +++ b/src/tools/qlalr/lalr.cpp @@ -754,7 +754,7 @@ void Automaton::buildDefaultReduceActions () if (item->dot != item->end_rhs ()) continue; - int la = lookaheads.value (item).size (); + int la = static_cast(lookaheads.value(item).size()); if (def == state->closure.end () || la > size) { def = item; -- cgit v1.2.3