1
Fork 0
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:
Andreas Kling 2020-04-18 14:22:42 +02:00
parent cebb619f8e
commit e3b450005f
4 changed files with 2 additions and 14 deletions

View file

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