summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydataops.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-08-22 15:40:42 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-10-25 12:01:58 -0700
commit2fd0996324304c4c055059a980b6f9b32b843574 (patch)
treedd89257e84270e3d080694c7821892d2522f4f3a /src/corelib/tools/qarraydataops.h
parent793cfec9418c6a900883c65e947993f320f5c987 (diff)
QArrayDataPointer: add an allocating constructor
It's by far the most common use, so having to call two things is just cumbersome. Change-Id: I79e700614d034281bf55fffd178f454c4e31929e Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/tools/qarraydataops.h')
-rw-r--r--src/corelib/tools/qarraydataops.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index bd8ead0a805..6ef378a085b 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -236,7 +236,7 @@ public:
if (it == end)
return result;
- QPodArrayOps<T> other{ Data::allocate(this->size), this->size };
+ QPodArrayOps<T> other(this->size, this->size);
Q_CHECK_PTR(other.data());
auto dest = other.begin();
// std::uninitialized_copy will fallback to ::memcpy/memmove()