mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 09:22:15 -07:00
remove PriorityUndefined and set PriorityFallback to 0
This commit is contained in:
parent
e3ff785db7
commit
35f36364e9
3 changed files with 5 additions and 6 deletions
|
|
@ -32,8 +32,7 @@ class CardSet : public QList<CardInfoPtr>
|
|||
public:
|
||||
enum Priority
|
||||
{
|
||||
PriorityUndefined = 0,
|
||||
PriorityFallback = 1,
|
||||
PriorityFallback = 0,
|
||||
PriorityPrimary = 10,
|
||||
PrioritySecondary = 20,
|
||||
PriorityReprint = 30,
|
||||
|
|
@ -54,12 +53,12 @@ public:
|
|||
const QString &_longName = QString(),
|
||||
const QString &_setType = QString(),
|
||||
const QDate &_releaseDate = QDate(),
|
||||
const Priority _priority = PriorityUndefined);
|
||||
const Priority _priority = PriorityFallback);
|
||||
static CardSetPtr newInstance(const QString &_shortName = QString(),
|
||||
const QString &_longName = QString(),
|
||||
const QString &_setType = QString(),
|
||||
const QDate &_releaseDate = QDate(),
|
||||
const Priority _priority = PriorityUndefined);
|
||||
const Priority _priority = PriorityFallback);
|
||||
QString getCorrectedShortName() const;
|
||||
QString getShortName() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ protected:
|
|||
const QString &longName = "",
|
||||
const QString &setType = "",
|
||||
const QDate &releaseDate = QDate(),
|
||||
const CardSet::Priority priority = CardSet::PriorityUndefined);
|
||||
const CardSet::Priority priority = CardSet::PriorityFallback);
|
||||
signals:
|
||||
virtual void addCard(CardInfoPtr card) = 0;
|
||||
virtual void addSet(CardSetPtr set) = 0;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ CardSet::Priority OracleImporter::getSetPriority(QString &setType, QString &shor
|
|||
if (!setTypePriorities.contains(setType.toLower())) {
|
||||
qDebug() << "warning: Set type" << setType << "unrecognized for prioritization";
|
||||
}
|
||||
CardSet::Priority priority = setTypePriorities.value(setType.toLower(), CardSet::PriorityUndefined);
|
||||
CardSet::Priority priority = setTypePriorities.value(setType.toLower(), CardSet::PriorityFallback);
|
||||
if (nonEnglishSets.contains(shortName)) {
|
||||
priority = CardSet::PriorityLowest;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue