From 8932eee9a652d8a325410b147955c9939278f9ed Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 5 Sep 2022 08:59:23 +0200 Subject: [PATCH] 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 --- src/corelib/tools/qoffsetstringarray_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qoffsetstringarray_p.h b/src/corelib/tools/qoffsetstringarray_p.h index f86316430a..93360a3925 100644 --- a/src/corelib/tools/qoffsetstringarray_p.h +++ b/src/corelib/tools/qoffsetstringarray_p.h @@ -128,7 +128,7 @@ template 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()); size_t offset = 0;