mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33: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
|
// convert entries into TallyRows
|
||||||
QList<TallyRow> rows;
|
QList<TallyRow> rows = QList<TallyRow>(entries.size());
|
||||||
rows.reserve(entries.size()); // for backwards compatibility with Qt5
|
std::transform(entries.begin(), entries.end(), rows.begin(),
|
||||||
std::transform(entries.begin(), entries.end(), std::back_inserter(rows),
|
|
||||||
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
|
[](const SubtypeEntry &e) { return TallyRow{e.name, QString::number(e.count)}; });
|
||||||
|
|
||||||
return rows;
|
return rows;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue