QStringConverter/AVX2: fix build with MSVC 2022

It doesn't like 0x80 passed to a char, causing a warning

qstringconverter.cpp(196): warning C4309: 'argument': truncation of constant value

Change-Id: I07ec23f3cb174fb197c3fffd17215b6f83476ebf
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
(cherry picked from commit 9968efb3cf6124606ee412f0b9e64c98113ab668)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2022-10-25 09:04:31 -07:00 committed by Qt Cherry-pick Bot
parent 5797796a9c
commit 5487b54302

View File

@ -194,7 +194,7 @@ static inline const uchar *simdFindNonAscii(const uchar *src, const uchar *end,
#ifdef __AVX2__
// do 32 characters at a time
// (this is similar to simdTestMask in qstring.cpp)
const __m256i mask = _mm256_set1_epi8(0x80);
const __m256i mask = _mm256_set1_epi8(char(0x80));
for ( ; end - src >= 32; src += 32) {
__m256i data = _mm256_loadu_si256(reinterpret_cast<const __m256i *>(src));
if (_mm256_testz_si256(mask, data))