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/normalopenglgraphics.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'src/render/normalopenglgraphics.cpp') diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp index 57f1d58cb..bbe6c8851 100644 --- a/src/render/normalopenglgraphics.cpp +++ b/src/render/normalopenglgraphics.cpp @@ -330,19 +330,18 @@ static inline void drawRescaledQuad(const Image *const image, } } -bool NormalOpenGLGraphics::drawImage(const Image *const image, +void NormalOpenGLGraphics::drawImage(const Image *const image, int dstX, int dstY) { - return drawImageInline(image, dstX, dstY); + drawImageInline(image, dstX, dstY); } -bool NormalOpenGLGraphics::drawImageInline(const Image *const image, +void NormalOpenGLGraphics::drawImageInline(const Image *const image, int dstX, int dstY) { FUNC_BLOCK("Graphics::drawImage", 1) if (!image) - return false; - + return; setColorAlpha(image->mAlpha); #ifdef DEBUG_BIND_TEXTURE @@ -354,14 +353,12 @@ bool NormalOpenGLGraphics::drawImageInline(const Image *const image, const SDL_Rect &imageRect = image->mBounds; drawQuad(image, imageRect.x, imageRect.y, dstX, dstY, imageRect.w, imageRect.h); - - return true; } -bool NormalOpenGLGraphics::copyImage(const Image *const image, +void NormalOpenGLGraphics::copyImage(const Image *const image, int dstX, int dstY) { - return drawImageInline(image, dstX, dstY); + drawImageInline(image, dstX, dstY); } void NormalOpenGLGraphics::testDraw() @@ -594,20 +591,23 @@ void NormalOpenGLGraphics::completeCache() mVpCached = 0; } -bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image, +void NormalOpenGLGraphics::drawRescaledImage(const Image *const image, int dstX, int dstY, const int desiredWidth, const int desiredHeight) { FUNC_BLOCK("Graphics::drawRescaledImage", 1) if (!image) - return false; + return; const SDL_Rect &imageRect = image->mBounds; // Just draw the image normally when no resizing is necessary, if (imageRect.w == desiredWidth && imageRect.h == desiredHeight) - return drawImageInline(image, dstX, dstY); + { + drawImageInline(image, dstX, dstY); + return; + } setColorAlpha(image->mAlpha); #ifdef DEBUG_BIND_TEXTURE @@ -619,8 +619,6 @@ bool NormalOpenGLGraphics::drawRescaledImage(const Image *const image, // Draw a textured quad. drawRescaledQuad(image, imageRect.x, imageRect.y, dstX, dstY, imageRect.w, imageRect.h, desiredWidth, desiredHeight); - - return true; } void NormalOpenGLGraphics::drawPattern(const Image *const image, @@ -1318,7 +1316,7 @@ SDL_Surface* NormalOpenGLGraphics::getScreenshot() return screenshot; } -bool NormalOpenGLGraphics::pushClipArea(const Rect &area) +void NormalOpenGLGraphics::pushClipArea(const Rect &area) { int transX = 0; int transY = 0; @@ -1330,7 +1328,7 @@ bool NormalOpenGLGraphics::pushClipArea(const Rect &area) transY = -clipArea.yOffset; } - const bool result = Graphics::pushClipArea(area); + Graphics::pushClipArea(area); const ClipRect &clipArea = mClipStack.top(); transX += clipArea.xOffset; @@ -1345,8 +1343,6 @@ bool NormalOpenGLGraphics::pushClipArea(const Rect &area) (mRect.h - clipArea.y - clipArea.height) * mScale, clipArea.width * mScale, clipArea.height * mScale); - - return result; } void NormalOpenGLGraphics::popClipArea() @@ -1484,7 +1480,7 @@ void NormalOpenGLGraphics::drawRectangle(const Rect& rect, BLOCK_END("Graphics::drawRectangle") } -bool NormalOpenGLGraphics::drawNet(const int x1, const int y1, +void NormalOpenGLGraphics::drawNet(const int x1, const int y1, const int x2, const int y2, const int width, const int height) { @@ -1533,8 +1529,6 @@ bool NormalOpenGLGraphics::drawNet(const int x1, const int y1, if (vp > 0) drawLineArrayf(vp); - - return true; } void NormalOpenGLGraphics::bindTexture(const GLenum target, -- cgit v1.2.3-60-g2f50