mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
Crashfix for opening Deck editor (#5403)
* CardDatabase::getCards() no longer copies the whole database --------- Co-authored-by: Jakub Mrowinski <ryder052@outlook.com>
This commit is contained in:
parent
34df4cd060
commit
8c0093d453
2 changed files with 4 additions and 4 deletions
|
|
@ -59,8 +59,8 @@ DlgMoveTopCardsUntil::DlgMoveTopCardsUntil(QWidget *parent, QString _expr, uint
|
|||
*/
|
||||
static bool matchExistsInDb(const FilterString &filterString)
|
||||
{
|
||||
const auto cardDatabase = CardDatabaseManager::getInstance();
|
||||
const auto allCards = cardDatabase->getCardList();
|
||||
const auto *cardDatabase = CardDatabaseManager::getInstance();
|
||||
const auto &allCards = cardDatabase->getCardList();
|
||||
|
||||
const auto it = std::find_if(allCards.begin(), allCards.end(),
|
||||
[&filterString](const CardInfoPtr &card) { return filterString.check(card); });
|
||||
|
|
|
|||
|
|
@ -477,9 +477,9 @@ public:
|
|||
CardSetPtr getSet(const QString &setName);
|
||||
bool isProviderIdForPreferredPrinting(const QString &cardName, const QString &providerId);
|
||||
static CardInfoPerSet getSetInfoForCard(const CardInfoPtr &_card);
|
||||
QList<CardInfoPtr> getCardList() const
|
||||
const CardNameMap &getCardList() const
|
||||
{
|
||||
return cards.values();
|
||||
return cards;
|
||||
}
|
||||
SetList getSetList() const;
|
||||
LoadStatus loadFromFile(const QString &fileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue