summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qringbuffer.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-08-29 12:28:08 -0700
committerThiago Macieira <thiago.macieira@intel.com>2024-08-30 10:13:07 -0700
commit6c15f99853c4cecd9285e189a441392a397b0f82 (patch)
tree137af031bdf1993c48966ad9b58e9fb5ea01b21a /src/corelib/tools/qringbuffer.cpp
parent6306ebe749e083126a39b9dd13d7060aa7bdacc2 (diff)
Fix users of static max_size()
Container::max_size() is a _non-static_ member function in the STL, so we can't call it as C::max_size(). Instead, use the newly-added, Qt-style camel-case maxSize(), which we will keep static constexpr. Pick-to: 6.8 Task-number: QTBUG-128450 Change-Id: I839df90a91cced85f000c7d2744ba547f629ed98 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/tools/qringbuffer.cpp')
-rw-r--r--src/corelib/tools/qringbuffer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp
index 06457591189..66de1f59c06 100644
--- a/src/corelib/tools/qringbuffer.cpp
+++ b/src/corelib/tools/qringbuffer.cpp
@@ -90,7 +90,7 @@ void QRingBuffer::free(qint64 bytes)
clear(); // try to minify/squeeze us
}
} else {
- Q_ASSERT(bytes < QByteArray::max_size());
+ Q_ASSERT(bytes < QByteArray::maxSize());
chunk.advance(bytes);
bufferSize -= bytes;
}
@@ -105,7 +105,7 @@ void QRingBuffer::free(qint64 bytes)
char *QRingBuffer::reserve(qint64 bytes)
{
- Q_ASSERT(bytes > 0 && bytes < QByteArray::max_size());
+ Q_ASSERT(bytes > 0 && bytes < QByteArray::maxSize());
const qsizetype chunkSize = qMax(qint64(basicBlockSize), bytes);
qsizetype tail = 0;
@@ -135,7 +135,7 @@ char *QRingBuffer::reserve(qint64 bytes)
*/
char *QRingBuffer::reserveFront(qint64 bytes)
{
- Q_ASSERT(bytes > 0 && bytes < QByteArray::max_size());
+ Q_ASSERT(bytes > 0 && bytes < QByteArray::maxSize());
const qsizetype chunkSize = qMax(qint64(basicBlockSize), bytes);
if (bufferSize == 0) {
@@ -181,7 +181,7 @@ void QRingBuffer::chop(qint64 bytes)
clear(); // try to minify/squeeze us
}
} else {
- Q_ASSERT(bytes < QByteArray::max_size());
+ Q_ASSERT(bytes < QByteArray::maxSize());
chunk.grow(-bytes);
bufferSize -= bytes;
}