summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearray.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-11-02 10:18:59 +0100
committerThiago Macieira <thiago.macieira@intel.com>2020-11-04 10:22:16 +0000
commit1282c05cdcc935a5eb1be150b8fd88f7771e81de (patch)
tree584ba75a2dcd63b77d3183e7229e634325e57d2e /src/corelib/text/qbytearray.cpp
parentedd1e931d1f0a1c5f9b2c1869d34db577307605d (diff)
Rename AllocationPosition enum and its members
Use GrowsAt* and GrowthPosition as that is clearer. Change-Id: I3c173797dec3620f508156efc0c51b4d2cd3e142 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/text/qbytearray.cpp')
-rw-r--r--src/corelib/text/qbytearray.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
index d729667ff7..f4ade684a0 100644
--- a/src/corelib/text/qbytearray.cpp
+++ b/src/corelib/text/qbytearray.cpp
@@ -1730,7 +1730,7 @@ void QByteArray::reallocGrowData(qsizetype n)
n = 1;
if (d->needsDetach()) {
- DataPointer dd(DataPointer::allocateGrow(d, n, QArrayData::AllocateAtEnd));
+ DataPointer dd(DataPointer::allocateGrow(d, n, QArrayData::GrowsAtEnd));
dd->copyAppend(d.data(), d.data() + d.size);
dd.data()[dd.size] = 0;
d = dd;
@@ -1934,7 +1934,7 @@ QByteArray &QByteArray::insert(qsizetype i, QByteArrayView data)
// the old memory:
DataPointer detached{}; // construction is free
if (d->needsDetach() || i + size - d->size > d.freeSpaceAtEnd()) {
- detached = DataPointer::allocateGrow(d, i + size - d->size, Data::AllocateAtEnd);
+ detached = DataPointer::allocateGrow(d, i + size - d->size, Data::GrowsAtEnd);
detached->copyAppend(d.constBegin(), d.constEnd());
d.swap(detached);
}
@@ -1993,7 +1993,7 @@ QByteArray &QByteArray::insert(qsizetype i, qsizetype count, char ch)
if (i >= d->size) {
// handle this specially, as QArrayDataOps::insert() doesn't handle out of bounds positions
if (d->needsDetach() || i + count - d->size > d.freeSpaceAtEnd()) {
- DataPointer detached(DataPointer::allocateGrow(d, i + count - d->size, Data::AllocateAtEnd));
+ DataPointer detached(DataPointer::allocateGrow(d, i + count - d->size, Data::GrowsAtEnd));
detached->copyAppend(d.constBegin(), d.constEnd());
d.swap(detached);
}