mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 21:04:07 -07:00
[Fix-Warnings] Replace types with auto for game/ files
This commit is contained in:
parent
6d8c4772f6
commit
2987c7a8a1
3 changed files with 15 additions and 15 deletions
|
|
@ -364,7 +364,7 @@ CardItem *GameScene::findTopmostCardInZone(const QList<QGraphicsItem *> &items,
|
||||||
qreal maxZ = -1;
|
qreal maxZ = -1;
|
||||||
|
|
||||||
for (QGraphicsItem *item : items) {
|
for (QGraphicsItem *item : items) {
|
||||||
CardItem *card = qgraphicsitem_cast<CardItem *>(item);
|
auto *card = qgraphicsitem_cast<CardItem *>(item);
|
||||||
if (!card)
|
if (!card)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -404,7 +404,7 @@ void GameScene::toggleZoneView(Player *player, const QString &zoneName, int numb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ZoneViewWidget *item =
|
auto *item =
|
||||||
new ZoneViewWidget(player, player->getZones().value(zoneName), numberCards, false, false, {}, isReversed);
|
new ZoneViewWidget(player, player->getZones().value(zoneName), numberCards, false, false, {}, isReversed);
|
||||||
|
|
||||||
zoneViews.append(item);
|
zoneViews.append(item);
|
||||||
|
|
@ -431,7 +431,7 @@ void GameScene::addRevealedZoneView(Player *player,
|
||||||
const QList<const ServerInfo_Card *> &cardList,
|
const QList<const ServerInfo_Card *> &cardList,
|
||||||
bool withWritePermission)
|
bool withWritePermission)
|
||||||
{
|
{
|
||||||
ZoneViewWidget *item = new ZoneViewWidget(player, zone, -2, true, withWritePermission, cardList);
|
auto *item = new ZoneViewWidget(player, zone, -2, true, withWritePermission, cardList);
|
||||||
zoneViews.append(item);
|
zoneViews.append(item);
|
||||||
connect(item, &ZoneViewWidget::closePressed, this, &GameScene::removeZoneView);
|
connect(item, &ZoneViewWidget::closePressed, this, &GameScene::removeZoneView);
|
||||||
addItem(item);
|
addItem(item);
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ void GameView::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
QGraphicsView::resizeEvent(event);
|
QGraphicsView::resizeEvent(event);
|
||||||
|
|
||||||
GameScene *s = dynamic_cast<GameScene *>(scene());
|
auto *s = dynamic_cast<GameScene *>(scene());
|
||||||
if (s)
|
if (s)
|
||||||
s->processViewSizeChange(event->size());
|
s->processViewSizeChange(event->size());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,17 +110,17 @@ PhasesToolbar::PhasesToolbar(QGraphicsItem *parent)
|
||||||
auto *aDrawCard = new QAction(this);
|
auto *aDrawCard = new QAction(this);
|
||||||
connect(aDrawCard, &QAction::triggered, this, &PhasesToolbar::actDrawCard);
|
connect(aDrawCard, &QAction::triggered, this, &PhasesToolbar::actDrawCard);
|
||||||
|
|
||||||
PhaseButton *untapButton = new PhaseButton("untap", this, aUntapAll);
|
auto *untapButton = new PhaseButton("untap", this, aUntapAll);
|
||||||
PhaseButton *upkeepButton = new PhaseButton("upkeep", this);
|
auto *upkeepButton = new PhaseButton("upkeep", this);
|
||||||
PhaseButton *drawButton = new PhaseButton("draw", this, aDrawCard);
|
auto *drawButton = new PhaseButton("draw", this, aDrawCard);
|
||||||
PhaseButton *main1Button = new PhaseButton("main1", this);
|
auto *main1Button = new PhaseButton("main1", this);
|
||||||
PhaseButton *combatStartButton = new PhaseButton("combat_start", this);
|
auto *combatStartButton = new PhaseButton("combat_start", this);
|
||||||
PhaseButton *combatAttackersButton = new PhaseButton("combat_attackers", this);
|
auto *combatAttackersButton = new PhaseButton("combat_attackers", this);
|
||||||
PhaseButton *combatBlockersButton = new PhaseButton("combat_blockers", this);
|
auto *combatBlockersButton = new PhaseButton("combat_blockers", this);
|
||||||
PhaseButton *combatDamageButton = new PhaseButton("combat_damage", this);
|
auto *combatDamageButton = new PhaseButton("combat_damage", this);
|
||||||
PhaseButton *combatEndButton = new PhaseButton("combat_end", this);
|
auto *combatEndButton = new PhaseButton("combat_end", this);
|
||||||
PhaseButton *main2Button = new PhaseButton("main2", this);
|
auto *main2Button = new PhaseButton("main2", this);
|
||||||
PhaseButton *cleanupButton = new PhaseButton("cleanup", this);
|
auto *cleanupButton = new PhaseButton("cleanup", this);
|
||||||
|
|
||||||
buttonList << untapButton << upkeepButton << drawButton << main1Button << combatStartButton << combatAttackersButton
|
buttonList << untapButton << upkeepButton << drawButton << main1Button << combatStartButton << combatAttackersButton
|
||||||
<< combatBlockersButton << combatDamageButton << combatEndButton << main2Button << cleanupButton;
|
<< combatBlockersButton << combatDamageButton << combatEndButton << main2Button << cleanupButton;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue