mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 17:32:15 -07:00
fix compiler warnings
This commit is contained in:
parent
ac371024a7
commit
e8261f1939
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "card_database.h"
|
||||
#include "card_item.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <algorithm>
|
||||
|
||||
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
||||
|
|
@ -67,7 +68,7 @@ std::function<QString(CardItem *)> 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<QString(CardItem *)> 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 ""; };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue