summaryrefslogtreecommitdiff
path: root/src/gui/windows/debugwindow.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/windows/debugwindow.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/gui/windows/debugwindow.cpp')
-rw-r--r--src/gui/windows/debugwindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp
index 1648a37ed..8b4144b98 100644
--- a/src/gui/windows/debugwindow.cpp
+++ b/src/gui/windows/debugwindow.cpp
@@ -47,7 +47,7 @@ DebugWindow::DebugWindow() :
mNetWidget(new NetDebugTab(this))
{
setWindowName("Debug");
- if (setupWindow)
+ if (setupWindow != nullptr)
setupWindow->registerWindowForReset(this);
setResizable(true);
@@ -94,7 +94,7 @@ void DebugWindow::postInit()
void DebugWindow::slowLogic()
{
BLOCK_START("DebugWindow::slowLogic")
- if (!isWindowVisible() || !mTabs)
+ if (!isWindowVisible() || (mTabs == nullptr))
{
BLOCK_END("DebugWindow::slowLogic")
return;
@@ -114,7 +114,7 @@ void DebugWindow::slowLogic()
break;
}
- if (localPlayer)
+ if (localPlayer != nullptr)
localPlayer->tryPingRequest();
BLOCK_END("DebugWindow::slowLogic")
}
@@ -124,10 +124,10 @@ void DebugWindow::draw(Graphics *const g)
BLOCK_START("DebugWindow::draw")
Window::draw(g);
- if (localPlayer)
+ if (localPlayer != nullptr)
{
const Being *const target = localPlayer->getTarget();
- if (target)
+ if (target != nullptr)
{
target->draw(g, -target->getPixelX() + mapTileSize / 2
+ mDimension.width / 2, -target->getPixelY() + mapTileSize
@@ -142,10 +142,10 @@ void DebugWindow::safeDraw(Graphics *const g)
BLOCK_START("DebugWindow::draw")
Window::safeDraw(g);
- if (localPlayer)
+ if (localPlayer != nullptr)
{
const Being *const target = localPlayer->getTarget();
- if (target)
+ if (target != nullptr)
{
target->draw(g, -target->getPixelX() + mapTileSize / 2
+ mDimension.width / 2, -target->getPixelY() + mapTileSize