QList: do some minor cleanups in the internal code
Change-Id: I7e502e4d2fa5af94c20e7da62d1c06597b6b16a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
fd9c2c8033
commit
6ac2b902d1
@ -84,7 +84,7 @@ public:
|
||||
Q_ASSERT(newSize - this->size <= this->freeSpaceAtEnd());
|
||||
|
||||
T *where = this->end();
|
||||
this->size = qsizetype(newSize);
|
||||
this->size = newSize;
|
||||
const T *e = this->end();
|
||||
while (where != e)
|
||||
*where++ = T();
|
||||
|
@ -228,7 +228,6 @@ public:
|
||||
if (n > 0)
|
||||
Q_CHECK_PTR(dp.data());
|
||||
if (where == QArrayData::GrowsAtBeginning) {
|
||||
Q_ASSERT(dp.ptr);
|
||||
Q_ASSERT(dp.freeSpaceAtBegin() >= n);
|
||||
} else {
|
||||
Q_ASSERT(dp.freeSpaceAtEnd() >= n);
|
||||
|
Loading…
Reference in New Issue
Block a user