From 479c2add326d368473829dcdb2a34b577f6ddfe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 11 Sep 2023 17:56:44 +0200 Subject: [PATCH] QNonContigByteDeviceThreadForwardImpl: NSDMI Makes it clearer what members depend on arguments to the ctor. And what the initial value of all the members are. Change-Id: Ie1cd2361955053eaf4c4e6887d23ac245738288d Reviewed-by: Edward Welbourne Reviewed-by: Mate Barany --- src/network/access/qhttpthreaddelegate_p.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h index c9202b61c4..0eff043d0b 100644 --- a/src/network/access/qhttpthreaddelegate_p.h +++ b/src/network/access/qhttpthreaddelegate_p.h @@ -164,22 +164,18 @@ class QNonContiguousByteDeviceThreadForwardImpl : public QNonContiguousByteDevic { Q_OBJECT protected: - bool wantDataPending; - qint64 m_amount; - char *m_data; + bool wantDataPending = false; + qint64 m_amount = 0; + char *m_data = nullptr; QByteArray m_dataArray; - bool m_atEnd; - qint64 m_size; - qint64 m_pos; // to match calls of haveDataSlot with the expected position + bool m_atEnd = false; + qint64 m_size = 0; + qint64 m_pos = 0; // to match calls of haveDataSlot with the expected position public: QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s) : QNonContiguousByteDevice(), - wantDataPending(false), - m_amount(0), - m_data(nullptr), m_atEnd(aE), - m_size(s), - m_pos(0) + m_size(s) { }