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/image/subimage.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/image/subimage.cpp')
-rw-r--r-- | src/resources/image/subimage.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/image/subimage.cpp b/src/resources/image/subimage.cpp index 7d936ecbf..77d0eb889 100644 --- a/src/resources/image/subimage.cpp +++ b/src/resources/image/subimage.cpp @@ -90,7 +90,7 @@ SubImage::SubImage(Image *const parent, mInternalBounds(), mParent(parent) { - if (mParent) + if (mParent != nullptr) { mParent->incRef(); mParent->SDLTerminateAlphaCache(); @@ -118,7 +118,7 @@ SubImage::SubImage(Image *const parent, mBounds.y = CAST_S16(y); mBounds.w = CAST_U16(width); mBounds.h = CAST_U16(height); - if (mParent) + if (mParent != nullptr) { mInternalBounds.x = mParent->mBounds.x; mInternalBounds.y = mParent->mBounds.y; @@ -145,7 +145,7 @@ SubImage::SubImage(Image *const parent, mInternalBounds(), mParent(parent) { - if (mParent) + if (mParent != nullptr) mParent->incRef(); // Set up the rectangle. @@ -153,7 +153,7 @@ SubImage::SubImage(Image *const parent, mBounds.y = CAST_S16(y); mBounds.w = CAST_U16(width); mBounds.h = CAST_U16(height); - if (mParent) + if (mParent != nullptr) { mInternalBounds.x = mParent->mBounds.x; mInternalBounds.y = mParent->mBounds.y; @@ -196,7 +196,7 @@ SubImage::~SubImage() #ifdef USE_OPENGL mGLImage = 0; #endif // USE_OPENGL - if (mParent) + if (mParent != nullptr) { #ifdef DEBUG_IMAGES logger->log("decref from subminage: %p, parent: %p", @@ -211,7 +211,7 @@ SubImage::~SubImage() Image *SubImage::getSubImage(const int x, const int y, const int w, const int h) { - if (mParent) + if (mParent != nullptr) return mParent->getSubImage(mBounds.x + x, mBounds.y + y, w, h); else return nullptr; |