diff options
author | Andreas Kling <kling@serenityos.org> | 2021-03-08 10:58:56 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-08 11:50:36 +0100 |
commit | 483b45db3fa95da26003759ea995e782c6493d06 (patch) | |
tree | a504e8d268d03e908ec7a70f0eaa0d922e9fdf81 /AK/JsonObject.h | |
parent | 9eff9b8cea9c87d21c9b4dd2fc5df5fcdc11f729 (diff) | |
download | serenity-483b45db3fa95da26003759ea995e782c6493d06.zip |
AK: JsonObject::value_or() fallback value should be a const reference
Diffstat (limited to 'AK/JsonObject.h')
-rw-r--r-- | AK/JsonObject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/JsonObject.h b/AK/JsonObject.h index c127887b37..73d0941c11 100644 --- a/AK/JsonObject.h +++ b/AK/JsonObject.h @@ -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; |