diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-24 10:25:43 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-24 10:25:43 +0200 |
commit | 1d0b4646180e7a6aa9b2bf6ea45f37d4b156c5d4 (patch) | |
tree | a6c990843ea0e304405ae0f8b3bf2116644ae525 /Kernel/KParams.cpp | |
parent | e2798d6208302a1195cb2888b69034d08dc95d89 (diff) | |
download | serenity-1d0b4646180e7a6aa9b2bf6ea45f37d4b156c5d4.zip |
AK: Make HashMap::get(Key) return an Optional<Value>.
This allows HashMap::get() to be used for value types that cannot be default
constructed (e.g NonnullOwnPtr.)
Diffstat (limited to 'Kernel/KParams.cpp')
-rw-r--r-- | Kernel/KParams.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/KParams.cpp b/Kernel/KParams.cpp index 26f4df771a..67a66aa079 100644 --- a/Kernel/KParams.cpp +++ b/Kernel/KParams.cpp @@ -29,7 +29,7 @@ KParams::KParams(const String& cmdline) String KParams::get(const String& key) const { - return m_params.get(key); + return m_params.get(key).value_or({}); } bool KParams::has(const String& key) const |