summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice.cpp
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-10-15 16:19:17 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2015-10-15 13:58:56 +0000
commit53569c1383928b279a6e9077303cfeca9d86d765 (patch)
tree12965181e16b61f94cda6bda1015fe77cb4336c7 /src/corelib/io/qiodevice.cpp
parent4456984da780b14572e1ec0f079a4d349ab299bd (diff)
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>
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r--src/corelib/io/qiodevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index c80c78bd3b..fa91b17747 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -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