From cfb8eeebe84003b79cd3f4573414c48d248fbe66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Thu, 27 Jan 2022 13:03:20 +0100 Subject: [PATCH] AK: Allow constructing a JsonArray from any array-like type --- AK/JsonArray.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AK/JsonArray.h b/AK/JsonArray.h index fb0764a47c..7088fc9eda 100644 --- a/AK/JsonArray.h +++ b/AK/JsonArray.h @@ -6,6 +6,7 @@ #pragma once +#include #include #include #include @@ -27,10 +28,10 @@ public: { } - template - JsonArray(Vector const& vector) + template + JsonArray(ContainerT const& source) { - for (auto& value : vector) + for (auto& value : source) m_values.append(move(value)); }