diff --git a/cockatrice/src/game_graphics/tally/subtype_tally.cpp b/cockatrice/src/game_graphics/tally/subtype_tally.cpp index 804443b15..5d34f6874 100644 --- a/cockatrice/src/game_graphics/tally/subtype_tally.cpp +++ b/cockatrice/src/game_graphics/tally/subtype_tally.cpp @@ -66,9 +66,8 @@ QList countSubtypes(const QList &cards) }); // convert entries into TallyRows - QList rows; - rows.reserve(entries.size()); // for backwards compatibility with Qt5 - std::transform(entries.begin(), entries.end(), std::back_inserter(rows), + QList rows = QList(entries.size()); + std::transform(entries.begin(), entries.end(), rows.begin(), [](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; }); return rows;