summaryrefslogtreecommitdiff
path: root/src/net/eathena/homunculusrecv.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/homunculusrecv.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/net/eathena/homunculusrecv.cpp')
-rw-r--r--src/net/eathena/homunculusrecv.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/net/eathena/homunculusrecv.cpp b/src/net/eathena/homunculusrecv.cpp
index a30e81662..204b618a7 100644
--- a/src/net/eathena/homunculusrecv.cpp
+++ b/src/net/eathena/homunculusrecv.cpp
@@ -46,7 +46,7 @@ namespace EAthena
void HomunculusRecv::processHomunculusSkills(Net::MessageIn &msg)
{
- if (skillDialog)
+ if (skillDialog != nullptr)
skillDialog->hideSkills(SkillOwner::Homunculus);
const int count = (msg.readInt16("len") - 4) / 37;
@@ -62,7 +62,7 @@ void HomunculusRecv::processHomunculusSkills(Net::MessageIn &msg)
const std::string name = msg.readString(24, "skill name");
const Modifiable up = fromBool(msg.readUInt8("up flag"), Modifiable);
PlayerInfo::setSkillLevel(skillId, level);
- if (skillDialog)
+ if (skillDialog != nullptr)
{
if (!skillDialog->updateSkill(skillId, range, up, inf, sp))
{
@@ -71,7 +71,7 @@ void HomunculusRecv::processHomunculusSkills(Net::MessageIn &msg)
}
}
}
- if (skillDialog)
+ if (skillDialog != nullptr)
skillDialog->updateModels();
}
@@ -82,7 +82,7 @@ void HomunculusRecv::processHomunculusData(Net::MessageIn &msg)
const BeingId id = msg.readBeingId("homunculus id");
Being *const dstBeing = actorManager->findBeing(id);
const int data = msg.readInt32("data");
- if (!cmd) // pre init
+ if (cmd == 0) // pre init
{
HomunculusInfo *const info = new HomunculusInfo;
info->id = id;
@@ -91,7 +91,7 @@ void HomunculusRecv::processHomunculusData(Net::MessageIn &msg)
return;
}
HomunculusInfo *const info = PlayerInfo::getHomunculus();
- if (!info)
+ if (info == nullptr)
return;
switch (cmd)
{
@@ -164,7 +164,7 @@ void HomunculusRecv::processHomunculusInfo(Net::MessageIn &msg)
PlayerInfo::updateAttrs();
HomunculusInfo *const info = PlayerInfo::getHomunculus();
- if (!info) // we can't find homunculus being because id is missing
+ if (info == nullptr)
return;
Being *const dstBeing = actorManager->findBeing(info->id);
@@ -185,10 +185,10 @@ void HomunculusRecv::processHomunculusSkillUp(Net::MessageIn &msg)
const int range = msg.readInt16("range");
const Modifiable up = fromBool(msg.readUInt8("up flag"), Modifiable);
- if (skillDialog && PlayerInfo::getSkillLevel(skillId) != level)
+ if (skillDialog != nullptr && PlayerInfo::getSkillLevel(skillId) != level)
skillDialog->playUpdateEffect(skillId);
PlayerInfo::setSkillLevel(skillId, level);
- if (skillDialog)
+ if (skillDialog != nullptr)
{
if (!skillDialog->updateSkill(skillId, range,
up, SkillType::Unknown, sp))
@@ -204,7 +204,7 @@ void HomunculusRecv::processHomunculusFood(Net::MessageIn &msg)
{
const int flag = msg.readUInt8("fail");
const int itemId = msg.readInt16("food id");
- if (flag)
+ if (flag != 0)
{
NotifyManager::notify(NotifyTypes::HOMUNCULUS_FEED_OK);
}
@@ -220,7 +220,7 @@ void HomunculusRecv::processHomunculusExp(Net::MessageIn &msg)
{
const int exp = msg.readInt32("exp");
msg.readInt32("unused");
- if (localPlayer)
+ if (localPlayer != nullptr)
localPlayer->addHomunXpMessage(exp);
}