From ab7cbe78ea676d5932881152631e6a6eafa530de Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 29 Jun 2014 23:14:53 +0300 Subject: Remove useless bool return value from renderers. --- src/render/surfacegraphics.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/render/surfacegraphics.cpp') 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 } -- cgit v1.2.3-70-g09d2