mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
fix c style casting (#2561)
This commit is contained in:
parent
ee154da598
commit
657e1ac9e6
8 changed files with 10 additions and 16 deletions
|
|
@ -43,11 +43,11 @@ void HandZone::handleDropEvent(const QList<CardDragItem *> &dragItems, CardZone
|
|||
int x = -1;
|
||||
if (settingsCache->getHorizontalHand()) {
|
||||
for (x = 0; x < cards.size(); x++)
|
||||
if (point.x() < ((CardItem *) cards.at(x))->scenePos().x())
|
||||
if (point.x() < static_cast<CardItem *>(cards.at(x))->scenePos().x())
|
||||
break;
|
||||
} else {
|
||||
for (x = 0; x < cards.size(); x++)
|
||||
if (point.y() < ((CardItem *) cards.at(x))->scenePos().y())
|
||||
if (point.y() < static_cast<CardItem *>(cards.at(x))->scenePos().y())
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ void HandZone::reorganizeCards()
|
|||
|
||||
for (int i = 0; i < cardCount; i++) {
|
||||
CardItem *c = cards.at(i);
|
||||
qreal x = i % 2 ? x2 : x1;
|
||||
qreal x = (i % 2) ? x2 : x1;
|
||||
// If the total height of the cards is smaller than the available height,
|
||||
// the cards do not need to overlap and are displayed in the center of the area.
|
||||
if (cardHeight * cardCount > totalHeight)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue