From 36ba43d6ea38062b17f7e63ef659962bfc51c64d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jun 2017 23:34:34 +0300 Subject: Fix clang-tidy check readability-implicit-bool-cast. --- src/gui/widgets/playerbox.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/playerbox.cpp') diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 47221af1f..b6217383f 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -76,7 +76,7 @@ PlayerBox::PlayerBox(Widget2 *const widget, PlayerBox::~PlayerBox() { - if (gui) + if (gui != nullptr) gui->removeDragged(this); Theme::unloadRect(mBackground); @@ -90,13 +90,13 @@ void PlayerBox::init(std::string name, std::string selectedName) setFrameSize(2); addMouseListener(this); - if (theme) + if (theme != nullptr) { if (name.empty()) name = "playerbox.xml"; mSkin = theme->loadSkinRect(mBackground, name, "playerbox_background.xml"); - if (mSkin) + if (mSkin != nullptr) { mDrawBackground = (mSkin->getOption("drawbackground") != 0); mOffsetX = mSkin->getOption("offsetX", -mapTileSize / 2); @@ -120,7 +120,7 @@ void PlayerBox::init(std::string name, std::string selectedName) void PlayerBox::draw(Graphics *const graphics) { BLOCK_START("PlayerBox::draw") - if (mBeing) + if (mBeing != nullptr) { const int bs = mFrameSize; const int x = mDimension.width / 2 + bs + mOffsetX; @@ -133,7 +133,7 @@ void PlayerBox::draw(Graphics *const graphics) const float alpha = settings.guiAlpha; for (int a = 0; a < 9; a++) { - if (mBackground.grid[a]) + if (mBackground.grid[a] != nullptr) mBackground.grid[a]->setAlpha(alpha); } } -- cgit v1.2.3-70-g09d2