mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Improve POD resize speed
This commit is contained in:
parent
2fded5ab0c
commit
a1fd8d1397
1 changed files with 2 additions and 2 deletions
|
@ -830,8 +830,8 @@ public:
|
||||||
else if (size > this->mSize)
|
else if (size > this->mSize)
|
||||||
{
|
{
|
||||||
Reserve(size);
|
Reserve(size);
|
||||||
while (size > this->mSize)
|
memset(&this->mVals[this->mSize], 0, (size - this->mSize) * sizeof(T));
|
||||||
this->mVals[this->mSize++] = T();
|
this->mSize = (int_cosize)size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue