summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/debugwindowtabs.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/gui/widgets/tabs/debugwindowtabs.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-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/gui/widgets/tabs/debugwindowtabs.cpp')
-rw-r--r--src/gui/widgets/tabs/debugwindowtabs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp
index e75e1d42d..4a600d2fd 100644
--- a/src/gui/widgets/tabs/debugwindowtabs.cpp
+++ b/src/gui/widgets/tabs/debugwindowtabs.cpp
@@ -171,7 +171,7 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
void MapDebugTab::logic()
{
BLOCK_START("MapDebugTab::logic")
- if (localPlayer)
+ if (localPlayer != nullptr)
{
// TRANSLATORS: debug window label
mXYLabel->setCaption(strprintf("%s (%d, %d)", _("Player Position:"),
@@ -184,7 +184,7 @@ void MapDebugTab::logic()
}
const Map *const map = Game::instance()->getCurrentMap();
- if (map && viewport)
+ if ((map != nullptr) && (viewport != nullptr))
{
// Get the current mouse position
const int mouseTileX = (viewport->mMouseX + viewport->getCameraX())
@@ -329,7 +329,7 @@ TargetDebugTab::TargetDebugTab(const Widget2 *const widget) :
void TargetDebugTab::logic()
{
BLOCK_START("TargetDebugTab::logic")
- if (localPlayer && localPlayer->getTarget())
+ if ((localPlayer != nullptr) && (localPlayer->getTarget() != nullptr))
{
const Being *const target = localPlayer->getTarget();
@@ -344,7 +344,7 @@ void TargetDebugTab::logic()
mTargetTypeLabel->setCaption(strprintf("%s %d",
// TRANSLATORS: debug window label
_("Target type:"), toInt(target->getSubType(), int)));
- if (target->getLevel())
+ if (target->getLevel() != 0)
{
mTargetLevelLabel->setCaption(strprintf("%s %d",
// TRANSLATORS: debug window label
@@ -389,7 +389,7 @@ void TargetDebugTab::logic()
_("Effects:"), target->getStatusEffectsString().c_str()));
const int delay = target->getAttackDelay();
- if (delay)
+ if (delay != 0)
{
mAttackDelayLabel->setCaption(strprintf("%s %d",
// TRANSLATORS: debug window label
@@ -469,7 +469,7 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) :
void NetDebugTab::logic()
{
BLOCK_START("NetDebugTab::logic")
- if (localPlayer)
+ if (localPlayer != nullptr)
{
// TRANSLATORS: debug window label
mPingLabel->setCaption(strprintf(_("Ping: %s ms"),