mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 05:05:32 +03:00
AK: Add DisjointChunkc::ensure_capacity
This commit is contained in:
parent
4574a58f6f
commit
3a177b9209
Notes:
sideshowbarker
2024-07-17 22:12:55 +09:00
Author: https://github.com/mhermier Commit: https://github.com/SerenityOS/serenity/commit/3a177b92093 Pull-request: https://github.com/SerenityOS/serenity/pull/11361
@ -200,6 +200,11 @@ public:
|
||||
ChunkType const& first_chunk() const { return m_chunks.first(); }
|
||||
ChunkType const& last_chunk() const { return m_chunks.last(); }
|
||||
|
||||
void ensure_capacity(size_t needed_capacity)
|
||||
{
|
||||
m_chunks.ensure_capacity(needed_capacity);
|
||||
}
|
||||
|
||||
void insert(size_t index, T value)
|
||||
{
|
||||
if (m_chunks.size() == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user