diff --git a/cockatrice/src/game/board/card_state.cpp b/cockatrice/src/game/board/card_state.cpp index ebcb2ada1..fe1aa9b73 100644 --- a/cockatrice/src/game/board/card_state.cpp +++ b/cockatrice/src/game/board/card_state.cpp @@ -22,13 +22,13 @@ void CardState::setZone(CardZoneLogic *_zone) emit stateChanged(); } -void CardState::setAttacking(bool v) +void CardState::setAttacking(bool _attacking) { - if (attacking == v) { + if (attacking == _attacking) { return; } - attacking = v; - emit attackingChanged(v); + attacking = _attacking; + emit attackingChanged(_attacking); emit stateChanged(); } @@ -59,53 +59,53 @@ void CardState::clearCounters() emit stateChanged(); } -void CardState::setAnnotation(const QString &a) +void CardState::setAnnotation(const QString &_annotation) { - if (annotation == a) { + if (annotation == _annotation) { return; } - annotation = a; + annotation = _annotation; emit annotationChanged(annotation); emit stateChanged(); } -void CardState::setPT(const QString &v) +void CardState::setPT(const QString &_pt) { - if (pt == v) { + if (pt == _pt) { return; } - pt = v; + pt = _pt; emit ptChanged(pt); emit stateChanged(); } -void CardState::setDoesntUntap(bool v) +void CardState::setDoesntUntap(bool _doesntUntap) { - if (doesntUntap == v) { + if (doesntUntap == _doesntUntap) { return; } - doesntUntap = v; - emit doesntUntapChanged(v); + doesntUntap = _doesntUntap; + emit doesntUntapChanged(_doesntUntap); emit stateChanged(); } -void CardState::setDestroyOnZoneChange(bool v) +void CardState::setDestroyOnZoneChange(bool _destroyOnZoneChange) { - if (destroyOnZoneChange == v) { + if (destroyOnZoneChange == _destroyOnZoneChange) { return; } - destroyOnZoneChange = v; - emit destroyOnZoneChangeChanged(v); + destroyOnZoneChange = _destroyOnZoneChange; + emit destroyOnZoneChangeChanged(_destroyOnZoneChange); emit stateChanged(); } -void CardState::setAttachedTo(CardItem *c) +void CardState::setAttachedTo(CardItem *_attachedTo) { - if (attachedTo == c) { + if (attachedTo == _attachedTo) { return; } - attachedTo = c; - emit attachedToChanged(c); + attachedTo = _attachedTo; + emit attachedToChanged(_attachedTo); emit stateChanged(); } \ No newline at end of file diff --git a/cockatrice/src/game/board/card_state.h b/cockatrice/src/game/board/card_state.h index 05301a7e1..ef17f408c 100644 --- a/cockatrice/src/game/board/card_state.h +++ b/cockatrice/src/game/board/card_state.h @@ -24,14 +24,14 @@ private: signals: void stateChanged(); - void attackingChanged(bool); - void countersChanged(QMap); - void annotationChanged(QString); - void ptChanged(QString); - void doesntUntapChanged(bool); - void destroyOnZoneChangeChanged(bool); - void attachedToChanged(CardItem *); - void zoneChanged(CardZoneLogic *); + void attackingChanged(bool newValue); + void countersChanged(const QMap &newCounters); + void annotationChanged(const QString &newAnnotation); + void ptChanged(const QString &newPt); + void doesntUntapChanged(bool newValue); + void destroyOnZoneChangeChanged(bool newValue); + void attachedToChanged(CardItem *newAttachedTo); + void zoneChanged(CardZoneLogic *newZone); public: explicit CardState(QObject *parent, CardZoneLogic *_zone) : QObject(parent), zone(_zone) @@ -51,7 +51,7 @@ public: { return attacking; } - void setAttacking(bool v); + void setAttacking(bool _attacking); const QMap &getCounters() const { @@ -69,35 +69,35 @@ public: return annotation; } - void setAnnotation(const QString &a); + void setAnnotation(const QString &_annotation); QString getPT() const { return pt; } - void setPT(const QString &v); + void setPT(const QString &_pt); bool getDoesntUntap() const { return doesntUntap; } - void setDoesntUntap(bool v); + void setDoesntUntap(bool _doesntUntap); bool getDestroyOnZoneChange() const { return destroyOnZoneChange; } - void setDestroyOnZoneChange(bool v); + void setDestroyOnZoneChange(bool _destroyOnZoneChange); CardItem *getAttachedTo() const { return attachedTo; } - void setAttachedTo(CardItem *c); + void setAttachedTo(CardItem *_attachedTo); }; #endif // COCKATRICE_CARD_STATE_H