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 <fabian.kosmale@qt.io>
This commit is contained in:
Marc Mutz 2024-01-29 10:33:14 +01:00
parent c1266c3635
commit 7310d2bd55

View File

@ -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