mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
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:
parent
95b9821f26
commit
7fec66dd1c
Notes:
sideshowbarker
2024-07-18 17:54:15 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/7fec66dd1cb Pull-request: https://github.com/SerenityOS/serenity/pull/7097 Reviewed-by: https://github.com/Dexesttp
2 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue