diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-20 09:30:00 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-20 21:09:00 +0200 |
commit | b6cd3bca280bd81e932ff51a3ec2b9fc70231646 (patch) | |
tree | f77332d26736b7b112dfc0737555d08ffac40975 /src/corelib/io/qnoncontiguousbytedevice.cpp | |
parent | 80a2878e201f294697d69b7606571a036c36a19d (diff) |
Whitespace cleanup in corelib/iov6.0.0-beta2
Selective application of clang-format to follow our coding style where
it is significantly off.
Change-Id: I0ff4ed146fe53922691d5473d0c236f31d478a04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/io/qnoncontiguousbytedevice.cpp')
-rw-r--r-- | src/corelib/io/qnoncontiguousbytedevice.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index df0197e8eb..cf2da0c896 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -297,7 +297,7 @@ QNonContiguousByteDeviceIoDeviceImpl::~QNonContiguousByteDeviceIoDeviceImpl() delete currentReadBuffer; } -const char* QNonContiguousByteDeviceIoDeviceImpl::readPointer(qint64 maximumLength, qint64 &len) +const char *QNonContiguousByteDeviceIoDeviceImpl::readPointer(qint64 maximumLength, qint64 &len) { if (eof == true) { len = -1; @@ -360,7 +360,6 @@ bool QNonContiguousByteDeviceIoDeviceImpl::advanceReadPointer(qint64 amount) currentReadBufferAmount = 0; } - return true; } @@ -374,7 +373,7 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset() bool reset = (initialPosition == 0) ? device->reset() : device->seek(initialPosition); if (reset) { eof = false; // assume eof is false, it will be true after a read has been attempted - totalAdvancements = 0; //reset the progress counter + totalAdvancements = 0; // reset the progress counter if (currentReadBuffer) { delete currentReadBuffer; currentReadBuffer = nullptr; @@ -441,8 +440,7 @@ qint64 QByteDeviceWrappingIoDevice::size() const return byteDevice->size(); } - -qint64 QByteDeviceWrappingIoDevice::readData( char * data, qint64 maxSize) +qint64 QByteDeviceWrappingIoDevice::readData(char *data, qint64 maxSize) { qint64 len; const char *readPointer = byteDevice->readPointer(maxSize, len); @@ -454,7 +452,7 @@ qint64 QByteDeviceWrappingIoDevice::readData( char * data, qint64 maxSize) return len; } -qint64 QByteDeviceWrappingIoDevice::writeData( const char* data, qint64 maxSize) +qint64 QByteDeviceWrappingIoDevice::writeData(const char *data, qint64 maxSize) { Q_UNUSED(data); Q_UNUSED(maxSize); @@ -482,10 +480,10 @@ qint64 QByteDeviceWrappingIoDevice::writeData( const char* data, qint64 maxSize) \internal */ -QNonContiguousByteDevice* QNonContiguousByteDeviceFactory::create(QIODevice *device) +QNonContiguousByteDevice *QNonContiguousByteDeviceFactory::create(QIODevice *device) { // shortcut if it is a QBuffer - if (QBuffer* buffer = qobject_cast<QBuffer*>(device)) { + if (QBuffer *buffer = qobject_cast<QBuffer *>(device)) { return new QNonContiguousByteDeviceBufferImpl(buffer); } @@ -566,7 +564,7 @@ QSharedPointer<QNonContiguousByteDevice> QNonContiguousByteDeviceFactory::create \internal */ -QIODevice* QNonContiguousByteDeviceFactory::wrap(QNonContiguousByteDevice* byteDevice) +QIODevice *QNonContiguousByteDeviceFactory::wrap(QNonContiguousByteDevice *byteDevice) { // ### FIXME if it already has been based on QIoDevice, we could that one out again // and save some calling |