1
Fork 0
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:
Andreas Kling 2019-10-23 14:55:21 +02:00
parent 5a2dd451b5
commit 93dff5df34

View file

@ -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;
};