mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 09:03:57 -07:00
parent
c3f8ca5aee
commit
9b02dae1fa
1 changed files with 2 additions and 3 deletions
|
|
@ -66,9 +66,8 @@ QList<TallyRow> countSubtypes(const QList<CardItem *> &cards)
|
|||
});
|
||||
|
||||
// convert entries into TallyRows
|
||||
QList<TallyRow> rows;
|
||||
rows.reserve(entries.size()); // for backwards compatibility with Qt5
|
||||
std::transform(entries.begin(), entries.end(), std::back_inserter(rows),
|
||||
QList<TallyRow> rows = QList<TallyRow>(entries.size());
|
||||
std::transform(entries.begin(), entries.end(), rows.begin(),
|
||||
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
|
||||
|
||||
return rows;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue