diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-12-14 23:20:39 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2021-12-21 22:56:00 +0100 |
commit | 6d4102729f58d5fc270dcb36d13df4c13ad6298b (patch) | |
tree | 85a879ce3b13b6415457bf117fbd41c943456960 | |
parent | 3552cf48e8cc68ca2ffba684f6c3a24a2bb9c15f (diff) |
QRingBuffer: remove QByteArray::resize()-shrinks work-around
QByteArray::resize() is now documented to not shrink capacity(), so
remove the extra reserve(0) work-around.
Change-Id: I3d5d944b9f01f8f84b31599548773198903aad4c
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
-rw-r--r-- | src/corelib/tools/qringbuffer.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp index 72c56a20f6..96ba5c2b44 100644 --- a/src/corelib/tools/qringbuffer.cpp +++ b/src/corelib/tools/qringbuffer.cpp @@ -82,7 +82,6 @@ QByteArray QRingChunk::toByteArray() && headOffset = 0; } - chunk.reserve(0); // avoid that resizing needlessly reallocates chunk.resize(tailOffset); } |