summaryrefslogtreecommitdiff
path: root/src/net/eathena/buyingstorerecv.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/buyingstorerecv.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/buyingstorerecv.cpp')
-rw-r--r--src/net/eathena/buyingstorerecv.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp
index 4f9188280..55c1624f9 100644
--- a/src/net/eathena/buyingstorerecv.cpp
+++ b/src/net/eathena/buyingstorerecv.cpp
@@ -96,7 +96,7 @@ void BuyingStoreRecv::processBuyingStoreShowBoard(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->setBuyBoard(shopName);
}
@@ -104,7 +104,7 @@ void BuyingStoreRecv::processBuyingStoreHideBoard(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("owner id");
Being *const dstBeing = actorManager->findBeing(id);
- if (dstBeing)
+ if (dstBeing != nullptr)
dstBeing->setBuyBoard(std::string());
if (dstBeing == localPlayer)
{
@@ -122,7 +122,7 @@ void BuyingStoreRecv::processBuyingStoreItemsList(Net::MessageIn &msg)
msg.readInt32("money limit");
const Being *const dstBeing = actorManager->findBeing(id);
- if (!dstBeing)
+ if (dstBeing == nullptr)
return;
SellDialog *const dialog = CREATEWIDGETR(BuyingStoreSellDialog,
@@ -138,10 +138,10 @@ void BuyingStoreRecv::processBuyingStoreItemsList(Net::MessageIn &msg)
msg.readUInt8("item type"));
const int itemId = msg.readInt16("item id");
- if (!inv)
+ if (inv == nullptr)
continue;
const Item *const item = inv->findItem(itemId, ItemColor_one);
- if (!item)
+ if (item == nullptr)
continue;
// +++ need add colors support
dialog->addItem(itemId, itemType, ItemColor_one, amount, price);
@@ -211,14 +211,14 @@ void BuyingStoreRecv::processBuyingStoreReport(Net::MessageIn &msg)
void BuyingStoreRecv::processBuyingStoreDeleteItem(Net::MessageIn &msg)
{
- Inventory *const inventory = localPlayer
+ Inventory *const inventory = localPlayer != nullptr
? PlayerInfo::getInventory() : nullptr;
const int index = msg.readInt16("index") - INVENTORY_OFFSET;
const int amount = msg.readInt16("amount");
msg.readInt32("price");
- if (inventory)
+ if (inventory != nullptr)
{
if (Item *const item = inventory->getItem(index))
{