diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-29 23:14:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-29 23:39:00 +0300 |
commit | ab7cbe78ea676d5932881152631e6a6eafa530de (patch) | |
tree | 47610db47cbaeb0a8e275f7dc35524b1e87b756c /src/render/surfacegraphics.cpp | |
parent | d02762b6dc35e1564e5d1cc7458458f824f251f9 (diff) | |
download | mv-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.gz mv-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.bz2 mv-ab7cbe78ea676d5932881152631e6a6eafa530de.tar.xz mv-ab7cbe78ea676d5932881152631e6a6eafa530de.zip |
Remove useless bool return value from renderers.
Diffstat (limited to 'src/render/surfacegraphics.cpp')
-rw-r--r-- | src/render/surfacegraphics.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/render/surfacegraphics.cpp b/src/render/surfacegraphics.cpp index 8691274dd..f3e68ed25 100644 --- a/src/render/surfacegraphics.cpp +++ b/src/render/surfacegraphics.cpp @@ -42,13 +42,13 @@ SurfaceGraphics::~SurfaceGraphics() { } -bool SurfaceGraphics::drawImage(const Image *const image, +void SurfaceGraphics::drawImage(const Image *const image, int dstX, int dstY) { FUNC_BLOCK("Graphics::drawImage", 1) // Check that preconditions for blitting are met. if (!mTarget || !image || !image->mSDLSurface) - return false; + return; const SDL_Rect &imageRect = image->mBounds; SDL_Rect dstRect; @@ -66,24 +66,23 @@ bool SurfaceGraphics::drawImage(const Image *const image, #else if (mBlitMode == BLIT_NORMAL) { - return !(SDL_BlitSurface(image->mSDLSurface, &srcRect, - mTarget, &dstRect) < 0); + SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect); } else { - return !(SurfaceImageHelper::combineSurface( - image->mSDLSurface, &srcRect, mTarget, &dstRect) < 0); + SurfaceImageHelper::combineSurface(image->mSDLSurface, + &srcRect, mTarget, &dstRect); } #endif } -bool SurfaceGraphics::copyImage(const Image *const image, +void SurfaceGraphics::copyImage(const Image *const image, int dstX, int dstY) { FUNC_BLOCK("Graphics::drawImage", 1) // Check that preconditions for blitting are met. if (!mTarget || !image || !image->mSDLSurface) - return false; + return; const SDL_Rect &imageRect = image->mBounds; SDL_Rect dstRect; @@ -97,11 +96,9 @@ bool SurfaceGraphics::copyImage(const Image *const image, #ifdef USE_SDL2 // probably need change some flags - return !(SDL_BlitSurface(image->mSDLSurface, &srcRect, - mTarget, &dstRect) < 0); + SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect); #else - return !(SDL_BlitSurface(image->mSDLSurface, &srcRect, - mTarget, &dstRect) < 0); + SDL_BlitSurface(image->mSDLSurface, &srcRect, mTarget, &dstRect); #endif } |