1
0
Fork 0
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:
Brian Fiete 2021-12-14 09:51:25 -05:00
parent 2fded5ab0c
commit a1fd8d1397

View file

@ -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;
} }
} }