summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWasm/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWasm/Parser')
-rw-r--r--Userland/Libraries/LibWasm/Parser/Parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWasm/Parser/Parser.cpp b/Userland/Libraries/LibWasm/Parser/Parser.cpp
index 2dd0759b81..5a6ab098be 100644
--- a/Userland/Libraries/LibWasm/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWasm/Parser/Parser.cpp
@@ -99,7 +99,9 @@ static ParseResult<ParseUntilAnyOfResult<T>> parse_until_any_of(InputStream& str
if (new_stream.has_any_error())
return with_eof_check(stream, ParseError::ExpectedValueOrTerminator);
- if ((... || (byte == terminators))) {
+ constexpr auto equals = [](auto&& a, auto&& b) { return a == b; };
+
+ if ((... || equals(byte, terminators))) {
result.terminator = byte;
return result;
}