mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
LibJS+LibIMAP: Use the new Optional<U>(Optional<T>) constructor
These look much nicer than these repeated ternaries :^)
This commit is contained in:
parent
a3a4d0aea2
commit
ace36681ff
Notes:
sideshowbarker
2024-07-17 20:22:46 +09:00
Author: https://github.com/IdanHo
Commit: ace36681ff
Pull-request: https://github.com/SerenityOS/serenity/pull/12090
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/linusg ✅
7 changed files with 23 additions and 28 deletions
|
@ -725,9 +725,9 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView
|
|||
DictionaryMember member {
|
||||
required,
|
||||
move(type),
|
||||
move(name),
|
||||
name,
|
||||
move(extended_attributes),
|
||||
default_value.has_value() ? default_value.value() : Optional<String> {},
|
||||
Optional<String>(move(default_value)),
|
||||
};
|
||||
dictionary.members.append(move(member));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue