mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Add resize(size_t, const T &) function to vector class
This commit is contained in:
parent
eba6bc07c1
commit
3374eac741
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user