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()
This commit is contained in:
Ali Mohammad Pur 2021-05-03 23:59:20 +04:30 committed by Andreas Kling
parent 95b9821f26
commit 7fec66dd1c
Notes: sideshowbarker 2024-07-18 17:54:15 +09:00
2 changed files with 4 additions and 2 deletions

View File

@ -102,7 +102,7 @@ public:
Optional<T> result;
m_value.visit(
[&](auto value) {
if constexpr (!IsSame<T, FunctionAddress> && !IsSame<T, ExternAddress>)
if constexpr (IsSame<T, decltype(value)>)
result = value;
},
[&](const FunctionAddress& address) {

View File

@ -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;
}