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/actions/statusbar.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/actions/statusbar.cpp')
-rw-r--r-- | src/actions/statusbar.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/actions/statusbar.cpp b/src/actions/statusbar.cpp index 4117c5daa..5832d49c0 100644 --- a/src/actions/statusbar.cpp +++ b/src/actions/statusbar.cpp @@ -112,7 +112,7 @@ impHandler0(changeMoveToTarget) impHandler0(changeGameModifier) { - if (localPlayer) + if (localPlayer != nullptr) { GameModifiers::changeGameModifiers(false); return true; @@ -123,7 +123,7 @@ impHandler0(changeGameModifier) impHandler0(changeAudio) { soundManager.changeAudio(); - if (localPlayer) + if (localPlayer != nullptr) localPlayer->updateMusic(); return true; } @@ -131,10 +131,10 @@ impHandler0(changeAudio) impHandler0(away) { GameModifiers::changeAwayMode(true); - if (localPlayer) + if (localPlayer != nullptr) { localPlayer->updateStatus(); - if (Game::instance()) + if (Game::instance() != nullptr) Game::instance()->setValidSpeed(); return true; } @@ -143,10 +143,10 @@ impHandler0(away) impHandler0(camera) { - if (viewport) + if (viewport != nullptr) { viewport->toggleCameraMode(); - if (Game::instance()) + if (Game::instance() != nullptr) Game::instance()->setValidSpeed(); return true; } @@ -155,10 +155,10 @@ impHandler0(camera) impHandler0(changeMapMode) { - if (viewport) + if (viewport != nullptr) viewport->toggleMapDrawType(); UpdateStatusListener::distributeEvent(); - if (Game::instance()) + if (Game::instance() != nullptr) { if (Map *const map = Game::instance()->getCurrentMap()) map->redrawMap(); @@ -169,9 +169,9 @@ impHandler0(changeMapMode) impHandler0(changeTrade) { unsigned int deflt = player_relations.getDefault(); - if (deflt & PlayerRelation::TRADE) + if ((deflt & PlayerRelation::TRADE) != 0u) { - if (localChatTab) + if (localChatTab != nullptr) { // TRANSLATORS: disable trades message localChatTab->chatLog(_("Ignoring incoming trade requests"), @@ -181,7 +181,7 @@ impHandler0(changeTrade) } else { - if (localChatTab) + if (localChatTab != nullptr) { // TRANSLATORS: enable trades message localChatTab->chatLog(_("Accepting incoming trade requests"), |