From 36ba43d6ea38062b17f7e63ef659962bfc51c64d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jun 2017 23:34:34 +0300 Subject: Fix clang-tidy check readability-implicit-bool-cast. --- src/gui/windows/maileditwindow.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui/windows/maileditwindow.cpp') 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(), -- cgit v1.2.3-70-g09d2