Fix compiler warning: don't copy in ranged-for loop

Change-Id: If21f4e34324f33300009a427fb81e23ab49d4ad0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Volker Hilsheimer 2022-09-03 12:53:33 +02:00
parent b05a2768c2
commit 3b91bab465

View File

@ -354,7 +354,7 @@ void tst_QStringConverter::roundtrip_data()
QTest::addColumn<QStringView>("utf16");
QTest::addColumn<QStringConverter::Encoding>("code");
for (const auto code : codes) {
for (const auto &code : codes) {
for (const TestString &s : testStrings) {
// rules:
// 1) don't pass the null character to the System codec
@ -1806,7 +1806,7 @@ void tst_QStringConverter::roundtripBom_data()
QTest::addColumn<QStringView>("utf16");
QTest::addColumn<QStringConverter::Encoding>("code");
for (const auto code : codes) {
for (const auto &code : codes) {
if (size_t(code.code) >= encodedBoms.size())
break;
if (code.limitation != FullUnicode)