summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressindicator.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/widgets/progressindicator.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/widgets/progressindicator.cpp')
-rw-r--r--src/gui/widgets/progressindicator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp
index 1b2b333e2..abeee678c 100644
--- a/src/gui/widgets/progressindicator.cpp
+++ b/src/gui/widgets/progressindicator.cpp
@@ -39,7 +39,7 @@ ProgressIndicator::ProgressIndicator(const Widget2 *const widget) :
ImageSet *const images = Theme::getImageSetFromTheme(
"progress-indicator.png", 32, 32);
- if (images)
+ if (images != nullptr)
{
Animation *const anim = new Animation("progress indicator");
for (ImageSet::size_type i = 0, fsz = images->size();
@@ -57,7 +57,7 @@ ProgressIndicator::ProgressIndicator(const Widget2 *const widget) :
ProgressIndicator::~ProgressIndicator()
{
- if (gui)
+ if (gui != nullptr)
gui->removeDragged(this);
delete2(mIndicator);
@@ -66,7 +66,7 @@ ProgressIndicator::~ProgressIndicator()
void ProgressIndicator::logic()
{
BLOCK_START("ProgressIndicator::logic")
- if (mIndicator)
+ if (mIndicator != nullptr)
mIndicator->update(10);
BLOCK_END("ProgressIndicator::logic")
}
@@ -74,7 +74,7 @@ void ProgressIndicator::logic()
void ProgressIndicator::draw(Graphics *const graphics)
{
BLOCK_START("ProgressIndicator::draw")
- if (mIndicator)
+ if (mIndicator != nullptr)
{
// Draw the indicator centered on the widget
const int x = (mDimension.width - 32) / 2;
@@ -87,7 +87,7 @@ void ProgressIndicator::draw(Graphics *const graphics)
void ProgressIndicator::safeDraw(Graphics *const graphics)
{
BLOCK_START("ProgressIndicator::draw")
- if (mIndicator)
+ if (mIndicator != nullptr)
{
// Draw the indicator centered on the widget
const int x = (mDimension.width - 32) / 2;