Functions (first part)

This commit is contained in:
Jakub Melka
2019-03-03 16:14:38 +01:00
parent 0666f976b1
commit 2023e17c4c
5 changed files with 655 additions and 2 deletions

View File

@ -136,6 +136,20 @@ public:
}
}
void resize(std::size_t size)
{
if (size <= FlatSize)
{
m_flatBlockItemCount = size;
m_variableBlock.clear();
}
else
{
m_flatBlockItemCount = FlatSize;
m_variableBlock.resize(size - FlatSize);
}
}
private:
size_t getFlatBlockSize() const { return m_flatBlockItemCount; }