tst_bench_qtimezone: fix a 'sign-compare' warning

- The problem is found by a clang-tidy tool.
Use size_t instead of qsizetype as a type for the index variable to
get rid of the warning.

The clang-tidy output:
tst_bench_qtimezone.cpp:130:30: warning: comparison of integer expressions of different signedness: ‘qsizetype’ {aka ‘long long int’}
and ‘std::size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
locIndex < std::size(locName) ? locName[locIndex] :
where.bcp47Name().toUtf8();

Task-number: QTBUG-105464
Change-Id: I603cbf201827e6e502c9737b02928f31ad6b2517
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
Tatiana Borisova 2024-08-29 12:52:52 +02:00 committed by Ivan Solovev
parent bbf980e43f
commit fc5015877f

View File

@ -123,7 +123,7 @@ void tst_QTimeZone::displayName_data()
const auto names = enoughZones();
for (const auto &name : names) {
for (const auto &when : times) {
qsizetype locIndex = 0;
std::size_t locIndex = 0;
for (const auto &where : locs) {
const QByteArray dt = when.toString(Qt::ISODate).toUtf8();
const QByteArray loc =