From e8261f1939ad70a1316d789f4e2d804fc68b91a7 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Fri, 29 Nov 2024 01:02:34 -0800 Subject: [PATCH] fix compiler warnings --- cockatrice/src/game/cards/card_list.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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