From 6d4102729f58d5fc270dcb36d13df4c13ad6298b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 14 Dec 2021 23:20:39 +0100 Subject: 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 --- src/corelib/tools/qringbuffer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/corelib/tools/qringbuffer.cpp') diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp index 72c56a20f6b..96ba5c2b44c 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); } -- cgit v1.2.3