mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
AK: Add DisjointChunkc::ensure_capacity
This commit is contained in:
parent
4574a58f6f
commit
3a177b9209
1 changed files with 5 additions and 0 deletions
|
@ -200,6 +200,11 @@ public:
|
||||||
ChunkType const& first_chunk() const { return m_chunks.first(); }
|
ChunkType const& first_chunk() const { return m_chunks.first(); }
|
||||||
ChunkType const& last_chunk() const { return m_chunks.last(); }
|
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)
|
void insert(size_t index, T value)
|
||||||
{
|
{
|
||||||
if (m_chunks.size() == 1)
|
if (m_chunks.size() == 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue