container/Buffer: Fix matching issue in fill()

Because of this inaccuracy, fill() could never be used in practice.
This commit is contained in:
Léo Lam 2022-03-25 19:46:36 +01:00
parent 5e6d930816
commit 0e8cad1d0d
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ public:
void fill(const T& v)
{
for (s32 i = 0; i < mSize; ++i)
for (s32 i = 0, n = mSize; i < n; ++i)
mBuffer[i] = v;
}