1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +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:
Andreas Kling 2020-04-18 14:22:42 +02:00
parent cebb619f8e
commit e3b450005f
Notes: sideshowbarker 2024-07-19 07:30:33 +09:00
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);