From 7310d2bd5562d1a88b69a544ab9b88c13cc3f978 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 29 Jan 2024 10:33:14 +0100 Subject: [PATCH] QBitArray: correct inline keyword The mutable operator[] method was marked as inline only at the definition, not the declaration. This is known to cause compilation failures on MinGW when the function is used in other inline implementation (cf. e.g. QTBUG-56459). It's not, atm, but fix the issue proactively. Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: If805122d9f8dbd72641173509c4b860c20fc1cdc Reviewed-by: Fabian Kosmale --- src/corelib/tools/qbitarray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h index e28f2086576..06273a26d7c 100644 --- a/src/corelib/tools/qbitarray.h +++ b/src/corelib/tools/qbitarray.h @@ -100,7 +100,7 @@ public: } bool at(qsizetype i) const { return testBit(i); } - QBitRef operator[](qsizetype i); + inline QBitRef operator[](qsizetype i); bool operator[](qsizetype i) const { return testBit(i); } QBitArray &operator&=(QBitArray &&); @@ -148,7 +148,7 @@ public: QBitRef &operator=(bool val) { a.setBit(i, val); return *this; } }; -inline QBitRef QBitArray::operator[](qsizetype i) +QBitRef QBitArray::operator[](qsizetype i) { Q_ASSERT(i >= 0); return QBitRef(*this, i); } #ifndef QT_NO_DATASTREAM