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/ea/chatrecv.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaverse-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/ea/chatrecv.cpp')
-rw-r--r-- | src/net/ea/chatrecv.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/net/ea/chatrecv.cpp b/src/net/ea/chatrecv.cpp index af01fd75b..87db3fa98 100644 --- a/src/net/ea/chatrecv.cpp +++ b/src/net/ea/chatrecv.cpp @@ -87,7 +87,7 @@ void ChatRecv::processWhisperResponseContinue(Net::MessageIn &msg, // Success (don't need to report) break; case 0x01: - if (chatWindow) + if (chatWindow != nullptr) { chatWindow->addWhisper(nick, // TRANSLATORS: chat message @@ -97,7 +97,7 @@ void ChatRecv::processWhisperResponseContinue(Net::MessageIn &msg, } break; case 0x02: - if (chatWindow) + if (chatWindow != nullptr) { chatWindow->addWhisper(nick, // TRANSLATORS: chat message @@ -107,7 +107,7 @@ void ChatRecv::processWhisperResponseContinue(Net::MessageIn &msg, } break; case 0x03: - if (chatWindow) + if (chatWindow != nullptr) { chatWindow->addWhisper(nick, // TRANSLATORS: chat message @@ -128,10 +128,12 @@ void ChatRecv::processMVPEffect(Net::MessageIn &msg) BLOCK_START("ChatRecv::processMVPEffect") // Display MVP player const BeingId id = msg.readBeingId("being id"); - if (localChatTab && actorManager && config.getBoolValue("showMVP")) + if (localChatTab != nullptr && + actorManager != nullptr && + config.getBoolValue("showMVP")) { const Being *const being = actorManager->findBeing(id); - if (!being) + if (being == nullptr) NotifyManager::notify(NotifyTypes::MVP_PLAYER, ""); else NotifyManager::notify(NotifyTypes::MVP_PLAYER, being->getName()); @@ -144,7 +146,7 @@ void ChatRecv::processIgnoreAllResponse(Net::MessageIn &msg) BLOCK_START("ChatRecv::processIgnoreAllResponse") const uint8_t action = msg.readUInt8("action"); const uint8_t fail = msg.readUInt8("result"); - if (!localChatTab) + if (localChatTab == nullptr) { BLOCK_END("ChatRecv::processIgnoreAllResponse") return; |