QOffsetStringArray: fix size_t/qsizetype mismatch

The sizeof operator returns, and both minifyValue and makeStaticString
accept, size_t. Don't funnel it through a qsizetype variable, then,
but maintain it as a size_t all the way.

Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103533
Change-Id: I05c6a6c5da3d02daabbf1d25a15531c6f44a80ce
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
Marc Mutz 2022-09-05 08:59:23 +02:00
parent 8aae49019d
commit 8932eee9a6

View File

@ -128,7 +128,7 @@ template <typename StringExtractor, typename... T>
constexpr auto makeOffsetStringArray(StringExtractor extractString, const T &... entries)
{
constexpr size_t Count = sizeof...(T);
constexpr qsizetype StringLength = (sizeof(extractString(T{})) + ...);
constexpr size_t StringLength = (sizeof(extractString(T{})) + ...);
using MinifiedOffsetType = decltype(QtPrivate::minifyValue<StringLength>());
size_t offset = 0;