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/modernopenglgraphics.h | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) (limited to 'src/render/modernopenglgraphics.h') diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index d4a0516b7..5af03950f 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -56,20 +56,23 @@ class ModernOpenGLGraphics final : public Graphics ~ModernOpenGLGraphics(); - void postInit() override final; + void postInit() restrict2 override final; void setColor(const Color &restrict color) restrict2 override final; - void screenResized() override final; + void screenResized() restrict2 override final; - void finalize(ImageCollection *const col) override final; + void finalize(ImageCollection *restrict const col) + restrict2 override final; - void finalize(ImageVertexes *const vert) override final; + void finalize(ImageVertexes *restrict const vert) + restrict2 override final; - void testDraw() override final; + void testDraw() restrict2 override final; void removeArray(const uint32_t id, - uint32_t *const arr) override final A_NONNULL(3); + uint32_t *restrict const arr) + restrict2 override final A_NONNULL(3); void createGLContext() restrict2 override final; @@ -80,32 +83,32 @@ class ModernOpenGLGraphics final : public Graphics #include "render/openglgraphicsdefadvanced.hpp" private: - void deleteGLObjects(); + void deleteGLObjects() restrict2; inline void drawQuad(const int srcX, const int srcY, const int dstX, const int dstY, - const int width, const int height); + const int width, const int height) restrict2; inline void drawRescaledQuad(const int srcX, const int srcY, const int dstX, const int dstY, const int width, const int height, const int desiredWidth, - const int desiredHeight); + const int desiredHeight) restrict2; - inline void drawTriangleArray(const int size); + inline void drawTriangleArray(const int size) restrict2; - inline void drawTriangleArray(const GLint *const array, - const int size); + inline void drawTriangleArray(const GLint *restrict const array, + const int size) restrict2; - inline void drawLineArrays(const int size); + inline void drawLineArrays(const int size) restrict2; - inline void bindArrayBuffer(const GLuint vbo); + inline void bindArrayBuffer(const GLuint vbo) restrict2; - inline void bindArrayBufferAndAttributes(const GLuint vbo); + inline void bindArrayBufferAndAttributes(const GLuint vbo) restrict2; - inline void bindAttributes(); + inline void bindAttributes() restrict2; - inline void bindElementBuffer(const GLuint ebo); + inline void bindElementBuffer(const GLuint ebo) restrict2; GLint *mIntArray A_NONNULLPOINTER; GLint *mIntArrayCached A_NONNULLPOINTER; -- cgit v1.2.3-60-g2f50