summaryrefslogtreecommitdiff
path: root/src/render/safeopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-25 20:25:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-25 20:25:38 +0300
commit104df5cae8521f4a234381567b19e6b4da3ff1f0 (patch)
tree2789b318f3f2d977bdd01921ae69c4f476954476 /src/render/safeopenglgraphics.cpp
parentc456cb3f7eea27839c4b2689d77ddc09926fb8c6 (diff)
downloadmanaplus-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.gz
manaplus-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.bz2
manaplus-104df5cae8521f4a234381567b19e6b4da3ff1f0.tar.xz
manaplus-104df5cae8521f4a234381567b19e6b4da3ff1f0.zip
Add restrict keyword to all renderers.
Diffstat (limited to 'src/render/safeopenglgraphics.cpp')
-rw-r--r--src/render/safeopenglgraphics.cpp33
1 files changed, 20 insertions, 13 deletions
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)
{