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/widgets/playerbox.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/widgets/playerbox.cpp')
-rw-r--r-- | src/gui/widgets/playerbox.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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); } } |