diff --git a/cockatrice/src/game/cards/card_list.cpp b/cockatrice/src/game/cards/card_list.cpp index 385643fb3..5d5e5dbef 100644 --- a/cockatrice/src/game/cards/card_list.cpp +++ b/cockatrice/src/game/cards/card_list.cpp @@ -3,6 +3,7 @@ #include "card_database.h" #include "card_item.h" +#include #include CardList::CardList(bool _contentsKnown) : QList(), contentsKnown(_contentsKnown) @@ -67,7 +68,7 @@ std::function CardList::getExtractorFor(SortOption option) { switch (option) { case NoSort: - return [](CardItem *c) { return ""; }; + return [](CardItem *) { return ""; }; case SortByName: return [](CardItem *c) { return c->getName(); }; case SortByType: @@ -76,4 +77,8 @@ std::function CardList::getExtractorFor(SortOption option) // getCmc returns the int as a string. We pad with 0's so that string comp also works on it return [](CardItem *c) { return c->getInfo() ? c->getInfo()->getCmc().rightJustified(4, '0') : ""; }; } + + // this line should never be reached + qDebug() << "cardlist.cpp: Could not find extractor for SortOption" << option; + return [](CardItem *) { return ""; }; } \ No newline at end of file