mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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
Notes:
sideshowbarker
2024-07-19 11:34:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/93dff5df34b
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…
Reference in a new issue