QIODevice::seek(): remove unnecessary check

At this point, the buffer is always not empty, as otherwise the offset
could not be smaller than it.

Change-Id: Iec04c0463623c4ed1e86bbcba2240653f110e315
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Alex Trotsenko 2015-10-15 16:19:17 +03:00
parent 4456984da7
commit 53569c1383

View File

@ -670,7 +670,7 @@ bool QIODevice::seek(qint64 pos)
// operation will then refill the buffer. We can optimize this, if we
// find that seeking backwards becomes a significant performance hit.
d->buffer.clear();
else if (!d->buffer.isEmpty())
else
d->buffer.skip(offset);
#if defined QIODEVICE_DEBUG