summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydataops.h
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2022-11-26 12:50:00 +0200
committerAhmad Samir <a.samirh78@gmail.com>2022-12-11 15:44:26 +0200
commit2fe3b0e5640df34d5512e06ecbc5739c2d4df21e (patch)
tree600624fcc281e5b5d1ade2a153ee6c325c594a12 /src/corelib/tools/qarraydataops.h
parentfa2153bd10057d7adbc5f5ededa1fd97c4a68161 (diff)
QContainerTools: add q_points_into_range overload
Looking at the use-cases of the already existing q_points_into_range overload, all of them can be ported to the new one (i.e. all of them were using range [begin, end)). Change-Id: I4bfdd68271512b88a9800a16237ff967a367eaeb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydataops.h')
-rw-r--r--src/corelib/tools/qarraydataops.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 13d5572c03..d50c74f2c2 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -916,11 +916,10 @@ public:
DataPointer old;
// points into range:
- if (QtPrivate::q_points_into_range(b, this->begin(), this->end())) {
+ if (QtPrivate::q_points_into_range(b, *this))
this->detachAndGrow(QArrayData::GrowsAtEnd, n, &b, &old);
- } else {
+ else
this->detachAndGrow(QArrayData::GrowsAtEnd, n, nullptr, nullptr);
- }
Q_ASSERT(this->freeSpaceAtEnd() >= n);
// b might be updated so use [b, n)
this->copyAppend(b, b + n);