mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-03 03:19:18 +00:00
Add resize(size_t, const T &) function to vector class
This commit is contained in:
@ -285,6 +285,14 @@ namespace std
|
||||
this->VectorSize.store(Size);
|
||||
}
|
||||
|
||||
void resize(size_t count, const T &value)
|
||||
{
|
||||
reserve(count);
|
||||
for (size_t i = this->VectorSize.load(); i < count; i++)
|
||||
this->VectorBuffer[i] = value;
|
||||
this->VectorSize.store(count);
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
this->VectorCapacity.store(0);
|
||||
|
Reference in New Issue
Block a user