QRingBuffer::read(): remove unneeded byte array allocation

QRingBuffer already works fine with empty list of arrays.

Change-Id: I5cd388709686d2980efa3d5129c726e75c0b5c09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Alex Trotsenko 2016-02-19 17:58:46 +02:00
parent ea711d0f59
commit ff76300a5c

View File

@ -276,7 +276,6 @@ QByteArray QRingBuffer::read()
if (tailBuffer == 0) {
qba.resize(tail);
tail = 0;
buffers.append(QByteArray());
} else {
--tailBuffer;
}