mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 12:03:25 -08:00
Apply else-after-return across the tree (#7884)
This commit is contained in:
parent
e97d3e5519
commit
c27b5e9fcf
22 changed files with 48 additions and 25 deletions
|
|
@ -33,7 +33,8 @@ AbstractClient *AbstractGame::getClientForPlayer(int playerId) const
|
|||
}
|
||||
|
||||
return gameState->getClients().at(playerId);
|
||||
} else if (gameState->getClients().isEmpty()) {
|
||||
}
|
||||
if (gameState->getClients().isEmpty()) {
|
||||
return nullptr;
|
||||
} else {
|
||||
return gameState->getClients().first();
|
||||
|
|
|
|||
|
|
@ -254,7 +254,8 @@ void PlayerLogic::deleteCard(CardState *card)
|
|||
{
|
||||
if (card == nullptr) {
|
||||
return;
|
||||
} else if (dialogSemaphore) {
|
||||
}
|
||||
if (dialogSemaphore) {
|
||||
cardsToDelete.append(card);
|
||||
} else {
|
||||
card->deleteView();
|
||||
|
|
|
|||
|
|
@ -194,7 +194,8 @@ QString CardZoneLogic::getTranslatedName(bool theirOwn, GrammaticalCase gc) cons
|
|||
QString ownerName = player->getPlayerInfo()->getName();
|
||||
if (name == ZoneNames::HAND) {
|
||||
return (theirOwn ? tr("their hand", "nominative") : tr("%1's hand", "nominative").arg(ownerName));
|
||||
} else if (name == ZoneNames::DECK) {
|
||||
}
|
||||
if (name == ZoneNames::DECK) {
|
||||
switch (gc) {
|
||||
case CaseLookAtZone:
|
||||
return (theirOwn ? tr("their library", "look at zone")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue