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 <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Mårten Nordheim 2020-05-08 11:31:20 +02:00
parent 3a955edb1a
commit a114b133f5

View File

@ -62,18 +62,9 @@ class QByteDataBuffer
{
private:
QList<QByteArray> 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);