From 104df5cae8521f4a234381567b19e6b4da3ff1f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 25 Dec 2015 20:25:38 +0300 Subject: Add restrict keyword to all renderers. --- src/render/safeopenglgraphics.cpp | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'src/render/safeopenglgraphics.cpp') diff --git a/src/render/safeopenglgraphics.cpp b/src/render/safeopenglgraphics.cpp index 57337412c..83ce736ea 100644 --- a/src/render/safeopenglgraphics.cpp +++ b/src/render/safeopenglgraphics.cpp @@ -68,15 +68,21 @@ bool SafeOpenGLGraphics::setVideoMode(const int w, const int h, return setOpenGLMode(); } -static inline void drawQuad(const Image *image, - const int srcX, const int srcY, - const int dstX, const int dstY, - const int width, const int height) A_NONNULL(1); - -static inline void drawQuad(const Image *image, - const int srcX, const int srcY, - const int dstX, const int dstY, - const int width, const int height) +static inline void drawQuad(const Image *restrict image, + const int srcX, + const int srcY, + const int dstX, + const int dstY, + const int width, + const int height) A_NONNULL(1); + +static inline void drawQuad(const Image *restrict image, + const int srcX, + const int srcY, + const int dstX, + const int dstY, + const int width, + const int height) { if (SafeOpenGLImageHelper::mTextureType == GL_TEXTURE_2D) { @@ -110,14 +116,14 @@ static inline void drawQuad(const Image *image, } } -static inline void drawRescaledQuad(const Image *const image, +static inline void drawRescaledQuad(const Image *restrict const image, const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height, const int desiredWidth, const int desiredHeight) A_NONNULL(1); -static inline void drawRescaledQuad(const Image *const image, +static inline void drawRescaledQuad(const Image *restrict const image, const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height, @@ -187,7 +193,7 @@ void SafeOpenGLGraphics::copyImage(const Image *restrict const image, drawImageInline(image, dstX, dstY); } -void SafeOpenGLGraphics::testDraw() +void SafeOpenGLGraphics::testDraw() restrict2 { if (SafeOpenGLImageHelper::mTextureType == GL_TEXTURE_2D) { @@ -687,7 +693,8 @@ void SafeOpenGLGraphics::drawRectangle(const Rect &restrict rect, BLOCK_END("Graphics::drawRectangle") } -void SafeOpenGLGraphics::bindTexture(const GLenum target, const GLuint texture) +void SafeOpenGLGraphics::bindTexture(const GLenum target, + const GLuint texture) { if (mTextureBinded != texture) { -- cgit v1.2.3-70-g09d2