summaryrefslogtreecommitdiff
path: root/src/net/eathena/petrecv.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/petrecv.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/net/eathena/petrecv.cpp')
-rw-r--r--src/net/eathena/petrecv.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/eathena/petrecv.cpp b/src/net/eathena/petrecv.cpp
index 50bf43eed..f2cf65a28 100644
--- a/src/net/eathena/petrecv.cpp
+++ b/src/net/eathena/petrecv.cpp
@@ -74,7 +74,7 @@ void PetRecv::processEggsList(Net::MessageIn &msg)
{
const int count = (msg.readInt16("len") - 4) / 2;
const Inventory *const inv = PlayerInfo::getInventory();
- if (!inv)
+ if (inv == nullptr)
return;
menu = MenuType::Eggs;
@@ -92,7 +92,7 @@ void PetRecv::processEggsList(Net::MessageIn &msg)
const int index = msg.readInt16("index") - INVENTORY_OFFSET;
const Item *const item = inv->getItem(index);
- if (item)
+ if (item != nullptr)
dialog->addItem(item, 0);
}
}
@@ -103,7 +103,7 @@ void PetRecv::processPetData(Net::MessageIn &msg)
const BeingId id = msg.readBeingId("pet id");
Being *const dstBeing = actorManager->findBeing(id);
const int data = msg.readInt32("data");
- if (!cmd) // pre init
+ if (cmd == 0) // pre init
{
PetInfo *const info = new PetInfo;
info->id = id;
@@ -112,7 +112,7 @@ void PetRecv::processPetData(Net::MessageIn &msg)
return;
}
PetInfo *const info = PlayerInfo::getPet();
- if (!info)
+ if (info == nullptr)
return;
switch (cmd)
{
@@ -150,7 +150,7 @@ void PetRecv::processPetStatus(Net::MessageIn &msg)
// being->setLevel(level);
PetInfo *const info = PlayerInfo::getPet();
- if (!info)
+ if (info == nullptr)
return;
info->name = name;
info->level = level;
@@ -167,7 +167,7 @@ void PetRecv::processPetFood(Net::MessageIn &msg)
{
const int result = msg.readUInt8("result");
msg.readInt16("food id");
- if (result)
+ if (result != 0)
NotifyManager::notify(NotifyTypes::PET_FEED_OK);
else
NotifyManager::notify(NotifyTypes::PET_FEED_ERROR);