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/windowmanager.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/gui/windowmanager.cpp')
-rw-r--r-- | src/gui/windowmanager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp index ffc3e6593..c683a6f77 100644 --- a/src/gui/windowmanager.cpp +++ b/src/gui/windowmanager.cpp @@ -194,7 +194,7 @@ void WindowManager::updateTitle() void WindowManager::setFramerate(const unsigned int fpsLimit) { - if (!fpsLimit) + if (fpsLimit == 0u) return; if (!settings.limitFps) @@ -240,7 +240,7 @@ void WindowManager::resizeVideo(int actualWidth, actualWidth = std::max(470, actualWidth); actualHeight = std::max(320, actualHeight); - if (!mainGraphics) + if (mainGraphics == nullptr) return; if (!always && mainGraphics->mActualWidth == actualWidth @@ -255,21 +255,21 @@ void WindowManager::resizeVideo(int actualWidth, const int height = mainGraphics->mHeight; touchManager.resize(width, height); - if (gui) + if (gui != nullptr) gui->videoResized(); - if (desktop) + if (desktop != nullptr) desktop->setSize(width, height); client->moveButtons(width); #ifndef DYECMD Game *const game = Game::instance(); - if (game) + if (game != nullptr) game->videoResized(width, height); #endif // DYECMD - if (gui) + if (gui != nullptr) gui->draw(); config.setValue("screenwidth", actualWidth); @@ -285,7 +285,7 @@ bool WindowManager::setFullScreen(const bool fs) return true; #else // __native_client__ - if (!mainGraphics) + if (mainGraphics == nullptr) return false; return mainGraphics->setFullscreen(fs); #endif // __native_client__ @@ -400,7 +400,7 @@ void WindowManager::setIcon() #else // WIN32 mIcon = MIMG_Load(iconFile.c_str()); - if (mIcon) + if (mIcon != nullptr) { #ifdef USE_SDL2 SDL_SetSurfaceAlphaMod(mIcon, SDL_ALPHA_OPAQUE); |