From ff76300a5c9f209f625384f35ad0fdb0acebd799 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Fri, 19 Feb 2016 17:58:46 +0200 Subject: [PATCH] QRingBuffer::read(): remove unneeded byte array allocation QRingBuffer already works fine with empty list of arrays. Change-Id: I5cd388709686d2980efa3d5129c726e75c0b5c09 Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qringbuffer.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/tools/qringbuffer.cpp b/src/corelib/tools/qringbuffer.cpp index 7e2d909dcd..db2004dfd9 100644 --- a/src/corelib/tools/qringbuffer.cpp +++ b/src/corelib/tools/qringbuffer.cpp @@ -276,7 +276,6 @@ QByteArray QRingBuffer::read() if (tailBuffer == 0) { qba.resize(tail); tail = 0; - buffers.append(QByteArray()); } else { --tailBuffer; }