Fix issue in List class
This commit is contained in:
parent
05e3b00689
commit
089d227434
|
@ -313,7 +313,7 @@ class List {
|
||||||
void addWithoutInit(uint nbElements) {
|
void addWithoutInit(uint nbElements) {
|
||||||
|
|
||||||
// If we need to allocate more memory
|
// If we need to allocate more memory
|
||||||
if (mSize == mCapacity) {
|
if ((mSize + nbElements) > mCapacity) {
|
||||||
reserve(mCapacity == 0 ? nbElements : (mCapacity + nbElements) * 2);
|
reserve(mCapacity == 0 ? nbElements : (mCapacity + nbElements) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user