mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00: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
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