diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2021-05-03 23:59:20 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-17 23:25:30 +0200 |
commit | 7fec66dd1cb84392deae09239e680017e378be45 (patch) | |
tree | 8a460af764f5c72872b988e1dd93a42df8968bc3 /Userland/Libraries/LibWasm/Parser | |
parent | 95b9821f26978d674d39a179b638207138823c16 (diff) | |
download | serenity-7fec66dd1cb84392deae09239e680017e378be45.zip |
LibWasm: Make clang happy by removing an 'extra' set of parenthesis
These aren't actually an extra set, without them the fold operation
would be syntactically invalid.
Also remove possible cast of float->double/double->float in Value::to()
Diffstat (limited to 'Userland/Libraries/LibWasm/Parser')
-rw-r--r-- | Userland/Libraries/LibWasm/Parser/Parser.cpp | 4 |
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; } |