diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-22 15:40:42 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-10-25 12:01:58 -0700 |
| commit | 2fd0996324304c4c055059a980b6f9b32b843574 (patch) | |
| tree | dd89257e84270e3d080694c7821892d2522f4f3a /src/corelib/tools/qarraydataops.h | |
| parent | 793cfec9418c6a900883c65e947993f320f5c987 (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.h | 2 |
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() |
