summaryrefslogtreecommitdiff
path: root/src/net/ea/partyrecv.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/ea/partyrecv.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/net/ea/partyrecv.cpp')
-rw-r--r--src/net/ea/partyrecv.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/ea/partyrecv.cpp b/src/net/ea/partyrecv.cpp
index 23acf0685..d81bb4295 100644
--- a/src/net/ea/partyrecv.cpp
+++ b/src/net/ea/partyrecv.cpp
@@ -54,7 +54,7 @@ namespace PartyRecv
void PartyRecv::processPartyCreate(Net::MessageIn &msg)
{
- if (msg.readUInt8("flag"))
+ if (msg.readUInt8("flag") != 0u)
NotifyManager::notify(NotifyTypes::PARTY_CREATE_FAILED);
else
NotifyManager::notify(NotifyTypes::PARTY_CREATED);
@@ -125,7 +125,7 @@ void PartyRecv::processPartyLeave(Net::MessageIn &msg)
const BeingId id = msg.readBeingId("account id");
const std::string nick = msg.readString(24, "nick");
const int reason = msg.readUInt8("flag");
- if (!localPlayer)
+ if (localPlayer == nullptr)
return;
if (id == localPlayer->getId())
@@ -153,7 +153,7 @@ void PartyRecv::processPartyLeave(Net::MessageIn &msg)
if (reason >= 2)
return;
- if (Ea::taParty)
+ if (Ea::taParty != nullptr)
{
Ea::taParty->removeFromMembers();
Ea::taParty->clearMembers();
@@ -161,7 +161,7 @@ void PartyRecv::processPartyLeave(Net::MessageIn &msg)
delete2(partyTab)
- if (socialWindow && Ea::taParty)
+ if ((socialWindow != nullptr) && (Ea::taParty != nullptr))
socialWindow->removeTab(Ea::taParty);
localPlayer->setPartyName("");
}
@@ -190,16 +190,16 @@ void PartyRecv::processPartyLeave(Net::MessageIn &msg)
if (reason >= 2)
return;
- if (actorManager)
+ if (actorManager != nullptr)
{
Being *const b = actorManager->findBeing(id);
- if (b && b->getType() == ActorType::Player)
+ if ((b != nullptr) && b->getType() == ActorType::Player)
{
b->setParty(nullptr);
b->setPartyName("");
}
}
- if (Ea::taParty)
+ if (Ea::taParty != nullptr)
Ea::taParty->removeMember(id);
}
}
@@ -208,9 +208,9 @@ void PartyRecv::processPartyUpdateCoords(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("account id");
PartyMember *m = nullptr;
- if (Ea::taParty)
+ if (Ea::taParty != nullptr)
m = Ea::taParty->getMember(id);
- if (m)
+ if (m != nullptr)
{
m->setX(msg.readInt16("x"));
m->setY(msg.readInt16("y"));