mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
Kernel: Remove CommandLine::get() in favor of lookup()
lookup() returns an Optional<String> which allows us to implement easy default values using lookup(key).value_or(default_value);
This commit is contained in:
parent
cebb619f8e
commit
e3b450005f
Notes:
sideshowbarker
2024-07-19 07:30:33 +09:00
Author: https://github.com/awesomekling
Commit: e3b450005f
4 changed files with 2 additions and 14 deletions
|
@ -66,11 +66,6 @@ Optional<String> CommandLine::lookup(const String& key) const
|
|||
return m_params.get(key);
|
||||
}
|
||||
|
||||
String CommandLine::get(const String& key) const
|
||||
{
|
||||
return m_params.get(key).value_or({});
|
||||
}
|
||||
|
||||
bool CommandLine::contains(const String& key) const
|
||||
{
|
||||
return m_params.contains(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue