replace foreach macro with standard for each loop (#5485)

This commit is contained in:
RickyRister 2025-01-16 21:18:15 -08:00 committed by GitHub
parent 0cbad25385
commit c148c8df7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 31 additions and 31 deletions

View file

@ -394,7 +394,7 @@ void DeckLoader::saveToStream_DeckHeader(QTextStream &out)
if (!getComments().isEmpty()) {
QStringList commentRows = getComments().split(QRegularExpression("\n|\r\n|\r"));
foreach (QString row, commentRows) {
for (const QString &row : commentRows) {
out << "// " << row << "\n";
}
out << "\n";
@ -433,7 +433,7 @@ void DeckLoader::saveToStream_DeckZone(QTextStream &out,
}
// print cards to stream
foreach (QString cardType, cardsByType.uniqueKeys()) {
for (const QString &cardType : cardsByType.uniqueKeys()) {
if (addComments) {
out << "// " << cardTotalByType[cardType] << " " << cardType << "\n";
}