QTaggedPointer: fix warning due to integer type conversion

Fixes: QTBUG-112222
Pick-to: 6.5
Change-Id: I4815d83c23e7616548ea84779d1c3d0774e77f69
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Hamish Moffatt 2023-03-24 11:03:41 +11:00
parent 5af5738980
commit ce58c66ae8

View File

@ -21,7 +21,7 @@ namespace QtPrivate {
static_assert((alignment & (alignment - 1)) == 0, static_assert((alignment & (alignment - 1)) == 0,
"Alignment of template parameter must be power of two"); "Alignment of template parameter must be power of two");
static constexpr quint8 tagBits = QtPrivate::qConstexprCountTrailingZeroBits(alignment); static constexpr quint8 tagBits = quint8{QtPrivate::qConstexprCountTrailingZeroBits(alignment)};
static_assert(tagBits > 0, static_assert(tagBits > 0,
"Alignment of template parameter does not allow any tags"); "Alignment of template parameter does not allow any tags");