mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: JsonObject::value_or() fallback value should be a const reference
This commit is contained in:
parent
9eff9b8cea
commit
483b45db3f
Notes:
sideshowbarker
2024-07-18 21:37:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/483b45db3fa
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ public:
|
|||
return value ? *value : JsonValue(JsonValue::Type::Null);
|
||||
}
|
||||
|
||||
JsonValue get_or(const String& key, JsonValue alternative) const
|
||||
JsonValue get_or(const String& key, const JsonValue& alternative) const
|
||||
{
|
||||
auto* value = get_ptr(key);
|
||||
return value ? *value : alternative;
|
||||
|
|
Loading…
Reference in a new issue