From 483b45db3fa95da26003759ea995e782c6493d06 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 8 Mar 2021 10:58:56 +0100 Subject: [PATCH] AK: JsonObject::value_or() fallback value should be a const reference --- AK/JsonObject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/JsonObject.h b/AK/JsonObject.h index c127887b374..73d0941c11c 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;