浏览代码

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 6 年之前
父节点
当前提交
210550d4b3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      AK/JsonArray.h

+ 2 - 0
AK/JsonArray.h

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