mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-13 03:06:10 +00:00
AK: Add JsonArray::ensure_capacity()
This is helpful for anyone who knows up-front how many items are gonna be appended to the JsonArray.
This commit is contained in:
@@ -62,6 +62,8 @@ public:
|
||||
|
||||
const Vector<JsonValue>& values() const { return m_values; }
|
||||
|
||||
void ensure_capacity(int capacity) { m_values.ensure_capacity(capacity); }
|
||||
|
||||
private:
|
||||
Vector<JsonValue> m_values;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user