mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +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:
parent
5a2dd451b5
commit
93dff5df34
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue