From 1282c05cdcc935a5eb1be150b8fd88f7771e81de Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 2 Nov 2020 10:18:59 +0100 Subject: Rename AllocationPosition enum and its members Use GrowsAt* and GrowthPosition as that is clearer. Change-Id: I3c173797dec3620f508156efc0c51b4d2cd3e142 Reviewed-by: Thiago Macieira --- src/corelib/text/qbytearray.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/text/qbytearray.cpp') 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); } -- cgit v1.2.3