From a114b133f567afe66b65d2edd3dd3998dfbd1218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 8 May 2020 11:31:20 +0200 Subject: QByteDataBuffer: Remove the ctor and dtor Remove the ctor as it was not doing anything special and the implicitly generated one will do what we need anyway. And calling clear before destructing wasn't useful, so just remove the dtor in general. Change-Id: I9ed722d4db3ea220d32082d4cb38c10a9af34d5e Reviewed-by: Edward Welbourne Reviewed-by: Marc Mutz --- src/corelib/text/qbytedata_p.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/corelib/text/qbytedata_p.h') diff --git a/src/corelib/text/qbytedata_p.h b/src/corelib/text/qbytedata_p.h index b319d75811..108aec72ac 100644 --- a/src/corelib/text/qbytedata_p.h +++ b/src/corelib/text/qbytedata_p.h @@ -62,18 +62,9 @@ class QByteDataBuffer { private: QList buffers; - qint64 bufferCompleteSize; - qint64 firstPos; + qint64 bufferCompleteSize = 0; + qint64 firstPos = 0; public: - QByteDataBuffer() : bufferCompleteSize(0), firstPos(0) - { - } - - ~QByteDataBuffer() - { - clear(); - } - static inline void popFront(QByteArray &ba, qint64 n) { ba = QByteArray(ba.constData() + n, ba.size() - n); -- cgit v1.2.3