mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
AK: JsonObject::value_or() fallback value should be a const reference
This commit is contained in:
parent
9eff9b8cea
commit
483b45db3f
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ public:
|
||||||
return value ? *value : JsonValue(JsonValue::Type::Null);
|
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);
|
auto* value = get_ptr(key);
|
||||||
return value ? *value : alternative;
|
return value ? *value : alternative;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue