summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydatapointer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qarraydatapointer.h')
-rw-r--r--src/corelib/tools/qarraydatapointer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h
index aebc83ba3f4..ad5acdb7fdf 100644
--- a/src/corelib/tools/qarraydatapointer.h
+++ b/src/corelib/tools/qarraydatapointer.h
@@ -209,6 +209,12 @@ public:
return d->constAllocatedCapacity() - freeSpaceAtBegin() - this->size;
}
+ static QArrayDataPointer allocateGrow(const QArrayDataPointer &from,
+ qsizetype newSize, QArrayData::ArrayOptions options)
+ {
+ return allocateGrow(from, from.detachCapacity(newSize), newSize, options);
+ }
+
static QArrayDataPointer allocateGrow(const QArrayDataPointer &from, qsizetype capacity,
qsizetype newSize, QArrayData::ArrayOptions options)
{