summaryrefslogtreecommitdiff
path: root/src/render/nullopenglgraphics.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/nullopenglgraphics.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/nullopenglgraphics.cpp')
-rw-r--r--src/render/nullopenglgraphics.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 16b1b5523..bce9360a4 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -106,13 +106,13 @@ bool NullOpenGLGraphics::setVideoMode(const int w, const int h,
return setOpenGLMode();
}
-static inline void drawQuad(const Image *const image A_UNUSED,
+static inline void drawQuad(const Image *restrict const image A_UNUSED,
const int srcX A_UNUSED, const int srcY A_UNUSED,
const int dstX A_UNUSED, const int dstY A_UNUSED,
const int width A_UNUSED,
const int height A_UNUSED) A_NONNULL(1);
-static inline void drawQuad(const Image *const image A_UNUSED,
+static inline void drawQuad(const Image *restrict const image A_UNUSED,
const int srcX A_UNUSED, const int srcY A_UNUSED,
const int dstX A_UNUSED, const int dstY A_UNUSED,
const int width A_UNUSED,
@@ -132,7 +132,7 @@ static inline void drawQuad(const Image *const image A_UNUSED,
}
}
-static inline void drawRescaledQuad(const Image *const image A_UNUSED,
+static inline void drawRescaledQuad(const Image *restrict const image A_UNUSED,
const int srcX A_UNUSED,
const int srcY A_UNUSED,
const int dstX A_UNUSED,
@@ -1118,35 +1118,37 @@ void NullOpenGLGraphics::bindTexture(const GLenum target A_UNUSED,
}
inline void NullOpenGLGraphics::drawQuadArrayfi(const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
#endif
}
-inline void NullOpenGLGraphics::drawQuadArrayfi(const GLint *const
+inline void NullOpenGLGraphics::drawQuadArrayfi(const GLint *restrict const
intVertArray A_UNUSED,
- const GLfloat *const
+ const GLfloat *restrict const
floatTexArray A_UNUSED,
const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
#endif
}
-inline void NullOpenGLGraphics::drawQuadArrayii(const int size A_UNUSED)
+inline void NullOpenGLGraphics::drawQuadArrayii(const int size A_UNUSED) restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
#endif
}
-inline void NullOpenGLGraphics::drawQuadArrayii(const GLint *const
+inline void NullOpenGLGraphics::drawQuadArrayii(const GLint *restrict const
intVertArray A_UNUSED,
- const GLint *const
+ const GLint *restrict const
intTexArray A_UNUSED,
- const int size A_UNUSED)
+ const int size A_UNUSED) restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
@@ -1154,6 +1156,7 @@ inline void NullOpenGLGraphics::drawQuadArrayii(const GLint *const
}
inline void NullOpenGLGraphics::drawLineArrayi(const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
@@ -1161,6 +1164,7 @@ inline void NullOpenGLGraphics::drawLineArrayi(const int size A_UNUSED)
}
inline void NullOpenGLGraphics::drawLineArrayf(const int size A_UNUSED)
+ restrict2
{
#ifdef DEBUG_DRAW_CALLS
mDrawCalls ++;
@@ -1201,6 +1205,7 @@ void NullOpenGLGraphics::calcImageRect(ImageVertexes *restrict const vert,
const int x, const int y,
const int w, const int h,
const ImageRect &restrict imgRect)
+ restrict2
{
#include "render/graphics_calcImageRect.hpp"
}