diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-06 23:34:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 19:23:40 +0300 |
commit | 36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch) | |
tree | 190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/windows/maileditwindow.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/windows/maileditwindow.cpp')
-rw-r--r-- | src/gui/windows/maileditwindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/windows/maileditwindow.cpp b/src/gui/windows/maileditwindow.cpp index c37cf0bac..a2f7fe6c8 100644 --- a/src/gui/windows/maileditwindow.cpp +++ b/src/gui/windows/maileditwindow.cpp @@ -132,17 +132,17 @@ void MailEditWindow::action(const ActionEvent &event) else if (eventId == "send") { const int money = mMoneyField->getValue(); - if (money) + if (money != 0) mailHandler->setAttachMoney(money); const Item *const tempItem = mInventory->getItem(0); - if (tempItem) + if (tempItem != nullptr) { const Inventory *const inv = PlayerInfo::getInventory(); - if (inv) + if (inv != nullptr) { const Item *const item = inv->findItem( tempItem->getId(), ItemColor_one); - if (item) + if (item != nullptr) { mailHandler->setAttach(item->getInvIndex(), tempItem->getQuantity()); @@ -164,7 +164,7 @@ void MailEditWindow::action(const ActionEvent &event) { Item *const item = inventoryWindow->getSelectedItem(); - if (!item) + if (item == nullptr) return; ItemAmountWindow::showWindow(ItemAmountWindowUsage::MailAdd, @@ -175,7 +175,7 @@ void MailEditWindow::action(const ActionEvent &event) void MailEditWindow::addItem(const Item *const item, const int amount) { - if (!item) + if (item == nullptr) return; mInventory->addItem(item->getId(), item->getType(), |