summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-05-25 16:09:03 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-05-27 14:28:18 +0200
commit6ac2b902d100d7126ef2b4c6ab8f15f5b54addc1 (patch)
tree063d604013d6f6c80027a31a1920724cb9578e44 /src/corelib/tools
parentfd9c2c803363d2036ba497946c2eee58b4c4fe18 (diff)
QList: do some minor cleanups in the internal code
Change-Id: I7e502e4d2fa5af94c20e7da62d1c06597b6b16a7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qarraydataops.h2
-rw-r--r--src/corelib/tools/qarraydatapointer.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 7e07cdf596..d28924bc63 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -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();
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index c984989ac8..4d83b890cc 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -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);