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/resources/ambientlayer.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/resources/ambientlayer.cpp')
-rw-r--r-- | src/resources/ambientlayer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp index 50397ab6a..fe702ccde 100644 --- a/src/resources/ambientlayer.cpp +++ b/src/resources/ambientlayer.cpp @@ -55,7 +55,7 @@ AmbientLayer::AmbientLayer(const std::string &name, mMask(mask), mKeepRatio(keepRatio) { - if (!mImage) + if (mImage == nullptr) return; if (keepRatio && @@ -74,7 +74,7 @@ AmbientLayer::AmbientLayer(const std::string &name, CAST_S32(mImage->mBounds.h) / defaultScreenHeight * height); - if (rescaledOverlay) + if (rescaledOverlay != nullptr) mImage = rescaledOverlay; else mImage->incRef(); @@ -86,7 +86,7 @@ AmbientLayer::AmbientLayer(const std::string &name, AmbientLayer::~AmbientLayer() { - if (mImage) + if (mImage != nullptr) { mImage->decRef(); mImage = nullptr; @@ -95,7 +95,7 @@ AmbientLayer::~AmbientLayer() void AmbientLayer::update(const int timePassed, const float dx, const float dy) { - if (!mImage) + if (mImage == nullptr) return; const float time = static_cast<float>(timePassed) / 10; @@ -126,7 +126,7 @@ void AmbientLayer::update(const int timePassed, const float dx, const float dy) void AmbientLayer::draw(Graphics *const graphics, const int x, const int y) const { - if (!mImage) + if (mImage == nullptr) return; if (imageHelper->useOpenGL() == RENDER_SOFTWARE || |