mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 04:50:01 -08:00
Apply else-after-return across the tree
This commit is contained in:
parent
5c7ac6412e
commit
012b30c9de
22 changed files with 48 additions and 25 deletions
|
|
@ -57,7 +57,8 @@ QVariant CardInfoComparator::getProperty(const CardInfoPtr &card, const QString
|
|||
// Check if the property exists in the main fields of the class
|
||||
if (property == "name") {
|
||||
return card->getName();
|
||||
} else if (property == "text") {
|
||||
}
|
||||
if (property == "text") {
|
||||
return card->getText();
|
||||
} else if (property == "isToken") {
|
||||
return card->getIsToken();
|
||||
|
|
|
|||
|
|
@ -154,7 +154,8 @@ void CardSetList::defaultSort()
|
|||
// Sort by priority, then by release date, then by short name
|
||||
if (a->getPriority() != b->getPriority()) {
|
||||
return a->getPriority() < b->getPriority(); // lowest first
|
||||
} else if (a->getReleaseDate() != b->getReleaseDate()) {
|
||||
}
|
||||
if (a->getReleaseDate() != b->getReleaseDate()) {
|
||||
return a->getReleaseDate() > b->getReleaseDate(); // most recent first
|
||||
} else {
|
||||
return a->getShortName() < b->getShortName(); // alphabetically
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue