mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
cleanup useless conversions
This commit is contained in:
parent
4e34948866
commit
8891cc6d04
1 changed files with 2 additions and 2 deletions
|
|
@ -1605,8 +1605,8 @@ void PlayerActions::actCardCounterTrigger()
|
||||||
for (const auto &item : selectedItems) {
|
for (const auto &item : selectedItems) {
|
||||||
const auto *card = dynamic_cast<CardItem *>(item);
|
const auto *card = dynamic_cast<CardItem *>(item);
|
||||||
|
|
||||||
const auto oldValue = QString::number(card->getCounters().value(counterId, 0));
|
const auto oldValue = card->getCounters().value(counterId, 0);
|
||||||
Expression exp(oldValue.toDouble());
|
Expression exp(oldValue);
|
||||||
const auto newValue = static_cast<int>(exp.parse(dialog.textValue()));
|
const auto newValue = static_cast<int>(exp.parse(dialog.textValue()));
|
||||||
|
|
||||||
auto *cmd = new Command_SetCardCounter;
|
auto *cmd = new Command_SetCardCounter;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue