summaryrefslogtreecommitdiff
path: root/src/net/eathena/vendingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/net/eathena/vendingrecv.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/net/eathena/vendingrecv.cpp')
-rw-r--r--src/net/eathena/vendingrecv.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/vendingrecv.cpp b/src/net/eathena/vendingrecv.cpp
index bf0cd20eb..23d4843f1 100644
--- a/src/net/eathena/vendingrecv.cpp
+++ b/src/net/eathena/vendingrecv.cpp
@@ -77,7 +77,7 @@ void VendingRecv::processShowBoard(Net::MessageIn &msg)
const BeingId id = msg.readBeingId("owner id");
const std::string shopName = msg.readString(80, "shop name");
Being *const dstBeing = actorManager->findBeing(id);
- if (dstBeing)
+ if (dstBeing != nullptr)
dstBeing->setSellBoard(shopName);
}
@@ -85,7 +85,7 @@ void VendingRecv::processHideBoard(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("owner id");
Being *const dstBeing = actorManager->findBeing(id);
- if (dstBeing)
+ if (dstBeing != nullptr)
dstBeing->setSellBoard(std::string());
if (dstBeing == localPlayer)
{
@@ -106,7 +106,7 @@ void VendingRecv::processItemsList(Net::MessageIn &msg)
const int count = (msg.readInt16("len") - offset) / packetLen;
const BeingId id = msg.readBeingId("id");
const Being *const being = actorManager->findBeing(id);
- if (!being)
+ if (being == nullptr)
return;
int cards[maxCards];
CREATEWIDGETV(mBuyDialog, BuyDialog, being, DEFAULT_CURRENCY);
@@ -142,7 +142,7 @@ void VendingRecv::processItemsList(Net::MessageIn &msg)
const ItemColor color = ItemColorManager::getColorFromCards(&cards[0]);
ShopItem *const item = mBuyDialog->addItem(itemId, type,
color, amount, value);
- if (item)
+ if (item != nullptr)
{
item->setInvIndex(index);
item->setOptions(options);
@@ -230,10 +230,10 @@ void VendingRecv::processReport(Net::MessageIn &msg)
money = msg.readInt32("zeny");
}
const Inventory *const inventory = PlayerInfo::getCartInventory();
- if (!inventory)
+ if (inventory == nullptr)
return;
const Item *const item = inventory->getItem(index);
- if (!item)
+ if (item == nullptr)
return;
const ItemInfo &info = item->getInfo();