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/render/surfacegraphics.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/render/surfacegraphics.cpp')
-rw-r--r-- | src/render/surfacegraphics.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp index 543f2add1..52d0db57f 100644 --- a/src/render/surfacegraphics.cpp +++ b/src/render/surfacegraphics.cpp @@ -48,8 +48,12 @@ void SurfaceGraphics::drawImage(const Image *restrict const image, { FUNC_BLOCK("Graphics::drawImage", 1) // Check that preconditions for blitting are met. - if (!mTarget || !image || !image->mSDLSurface) + if (mTarget == nullptr || + image == nullptr || + image->mSDLSurface == nullptr) + { return; + } const SDL_Rect &imageRect = image->mBounds; SDL_Rect dstRect; @@ -82,8 +86,12 @@ void SurfaceGraphics::copyImage(const Image *restrict const image, { FUNC_BLOCK("Graphics::drawImage", 1) // Check that preconditions for blitting are met. - if (!mTarget || !image || !image->mSDLSurface) + if (mTarget == nullptr || + image == nullptr || + image->mSDLSurface == nullptr) + { return; + } const SDL_Rect &imageRect = image->mBounds; SDL_Rect dstRect; @@ -109,8 +117,12 @@ void SurfaceGraphics::drawImageCached(const Image *restrict const image, { FUNC_BLOCK("Graphics::drawImageCached", 1) // Check that preconditions for blitting are met. - if (!mTarget || !image || !image->mSDLSurface) + if (mTarget == nullptr || + image == nullptr || + image->mSDLSurface == nullptr) + { return; + } const SDL_Rect &rect = image->mBounds; |