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/gui/windows/debugwindow.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz manaplus-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.cpp | 14 |
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 |