mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-22 18:32:17 -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_database.h"
|
||||||
#include "card_item.h"
|
#include "card_item.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
CardList::CardList(bool _contentsKnown) : QList<CardItem *>(), contentsKnown(_contentsKnown)
|
||||||
|
|
@ -67,7 +68,7 @@ std::function<QString(CardItem *)> CardList::getExtractorFor(SortOption option)
|
||||||
{
|
{
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case NoSort:
|
case NoSort:
|
||||||
return [](CardItem *c) { return ""; };
|
return [](CardItem *) { return ""; };
|
||||||
case SortByName:
|
case SortByName:
|
||||||
return [](CardItem *c) { return c->getName(); };
|
return [](CardItem *c) { return c->getName(); };
|
||||||
case SortByType:
|
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
|
// 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') : ""; };
|
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