diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-06 23:34:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 19:23:40 +0300 |
commit | 36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch) | |
tree | 190156cb88b13a38a6d13c69ee0742cc078065a1 /src/net/eathena/mercenaryrecv.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | plus-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/mercenaryrecv.cpp')
-rw-r--r-- | src/net/eathena/mercenaryrecv.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/eathena/mercenaryrecv.cpp b/src/net/eathena/mercenaryrecv.cpp index 042c87451..594c96b6a 100644 --- a/src/net/eathena/mercenaryrecv.cpp +++ b/src/net/eathena/mercenaryrecv.cpp @@ -120,7 +120,7 @@ void MercenaryRecv::processMercenaryInfo(Net::MessageIn &msg) range); PlayerInfo::updateAttrs(); - if (dstBeing && localPlayer) + if ((dstBeing != nullptr) && (localPlayer != nullptr)) { MercenaryInfo *const mercenary = new MercenaryInfo; mercenary->id = dstBeing->getId(); @@ -134,7 +134,7 @@ void MercenaryRecv::processMercenaryInfo(Net::MessageIn &msg) void MercenaryRecv::processMercenarySkills(Net::MessageIn &msg) { - if (skillDialog) + if (skillDialog != nullptr) skillDialog->hideSkills(SkillOwner::Mercenary); const int count = (msg.readInt16("len") - 4) / 37; for (int f = 0; f < count; f ++) @@ -148,7 +148,7 @@ void MercenaryRecv::processMercenarySkills(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)) { @@ -157,14 +157,14 @@ void MercenaryRecv::processMercenarySkills(Net::MessageIn &msg) } } } - if (skillDialog) + if (skillDialog != nullptr) skillDialog->updateModels(); } void MercenaryRecv::handleMercenaryMessage(const int cmd) { PlayerInfo::setMercenary(nullptr); - if (skillDialog) + if (skillDialog != nullptr) { skillDialog->hideSkills(SkillOwner::Mercenary); skillDialog->updateModels(); |