Parcourir la source

JsonArray: Expose the value vector to the outside for convenience

Sometimes it's easier to just work with a const Vector<JsonValue>&,
so give clients the option of doing that.
Andreas Kling il y a 6 ans
Parent
commit
210550d4b3
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      AK/JsonArray.h

+ 2 - 0
AK/JsonArray.h

@@ -29,6 +29,8 @@ public:
             callback(value);
     }
 
+    const Vector<JsonValue>& values() const { return m_values; }
+
 private:
     Vector<JsonValue> m_values;
 };