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/tmwa/partyhandler.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/tmwa/partyhandler.cpp')
-rw-r--r-- | src/net/tmwa/partyhandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index ae93238f4..54c808556 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -59,12 +59,12 @@ void PartyHandler::create(const std::string &name) const void PartyHandler::invite(const std::string &name) const { - if (!actorManager) + if (actorManager == nullptr) return; const Being *const being = actorManager->findBeingByName( name, ActorType::Player); - if (being) + if (being != nullptr) { createOutPacket(CMSG_PARTY_INVITE); outMsg.writeBeingId(being->getId(), "account id"); @@ -74,7 +74,7 @@ void PartyHandler::invite(const std::string &name) const void PartyHandler::inviteResponse(const int partyId A_UNUSED, const bool accept) const { - if (localPlayer) + if (localPlayer != nullptr) { createOutPacket(CMSG_PARTY_INVITED); outMsg.writeBeingId(localPlayer->getId(), "account id"); @@ -89,7 +89,7 @@ void PartyHandler::leave() const void PartyHandler::kick(const Being *const being) const { - if (being) + if (being != nullptr) { createOutPacket(CMSG_PARTY_KICK); outMsg.writeBeingId(being->getId(), "account id"); @@ -99,11 +99,11 @@ void PartyHandler::kick(const Being *const being) const void PartyHandler::kick(const std::string &name) const { - if (!Ea::taParty) + if (Ea::taParty == nullptr) return; const PartyMember *const m = Ea::taParty->getMember(name); - if (!m) + if (m == nullptr) { NotifyManager::notify(NotifyTypes::PARTY_USER_NOT_IN_PARTY, name); return; |