QEvent: initialize the static userEventTypeRegistry constexprly
The {} is the difference.
Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce8dabd213393e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
bb10
parent
82147ce33a
commit
c05ee60a2f
|
|
@ -456,6 +456,8 @@ struct QBasicAtomicBitField {
|
|||
QBasicAtomicInteger<uint> next;
|
||||
QBasicAtomicInteger<uint> data[NumInts];
|
||||
|
||||
constexpr QBasicAtomicBitField() = default;
|
||||
|
||||
bool allocateSpecific(int which) noexcept
|
||||
{
|
||||
QBasicAtomicInteger<uint> &entry = data[which / BitsPerInt];
|
||||
|
|
@ -496,7 +498,7 @@ struct QBasicAtomicBitField {
|
|||
|
||||
typedef QBasicAtomicBitField<QEvent::MaxUser - QEvent::User + 1> UserEventTypeRegistry;
|
||||
|
||||
static UserEventTypeRegistry userEventTypeRegistry;
|
||||
static UserEventTypeRegistry userEventTypeRegistry {};
|
||||
|
||||
static inline int registerEventTypeZeroBased(int id) noexcept
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue