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/progressbar.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/widgets/progressbar.cpp')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index e84200973..7299140c6 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -80,10 +80,10 @@ ProgressBar::ProgressBar(const Widget2 *const widget, addWidgetListener(this); setSize(width, height); - if (theme) + if (theme != nullptr) { mSkin = theme->load(skin, "progressbar.xml"); - if (mSkin) + if (mSkin != nullptr) { setPadding(mSkin->getPadding()); mFillPadding = mSkin->getOption("fillPadding"); @@ -99,13 +99,13 @@ ProgressBar::ProgressBar(const Widget2 *const widget, ProgressBar::~ProgressBar() { - if (gui) + if (gui != nullptr) gui->removeDragged(this); mInstances--; - if (mSkin) + if (mSkin != nullptr) { - if (theme) + if (theme != nullptr) theme->unload(mSkin); mSkin = nullptr; } @@ -157,7 +157,7 @@ void ProgressBar::updateAlpha() void ProgressBar::draw(Graphics *const graphics) { BLOCK_START("ProgressBar::draw") - if (!mSkin) + if (mSkin == nullptr) { BLOCK_END("ProgressBar::draw") return; @@ -223,7 +223,7 @@ void ProgressBar::draw(Graphics *const graphics) } const Image *const image = mTextChunk.img; - if (image) + if (image != nullptr) { const int textX = (mDimension.width - font->getWidth(mText)) / 2; const int textY = (mDimension.height - font->getHeight()) / 2; @@ -236,7 +236,7 @@ void ProgressBar::draw(Graphics *const graphics) void ProgressBar::safeDraw(Graphics *const graphics) { BLOCK_START("ProgressBar::safeDraw") - if (!mSkin) + if (mSkin == nullptr) { BLOCK_END("ProgressBar::safeDraw") return; @@ -294,7 +294,7 @@ void ProgressBar::safeDraw(Graphics *const graphics) } const Image *const image = mTextChunk.img; - if (image) + if (image != nullptr) { const int textX = (mDimension.width - font->getWidth(mText)) / 2; const int textY = (mDimension.height - font->getHeight()) / 2; |