mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
replace foreach macro with standard for each loop (#5485)
This commit is contained in:
parent
0cbad25385
commit
c148c8df7f
17 changed files with 31 additions and 31 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue