From 07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 17 Dec 2013 17:55:43 +0300 Subject: add restrict keyword into dye class. --- src/resources/dye.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/resources/dye.h') diff --git a/src/resources/dye.h b/src/resources/dye.h index c5e60b520..fe3f2a606 100644 --- a/src/resources/dye.h +++ b/src/resources/dye.h @@ -63,22 +63,24 @@ class DyePalette final /** * replace colors for SDL for S dye. */ - void replaceSColor(uint32_t *pixels, const int bufSize) const; + void replaceSColor(uint32_t *restrict pixels, const int bufSize) const; /** * replace colors for SDL for S dye. */ - void replaceAColor(uint32_t *pixels, const int bufSize) const; + void replaceAColor(uint32_t *restrict pixels, const int bufSize) const; /** * replace colors for OpenGL for S dye. */ - void replaceSOGLColor(uint32_t *pixels, const int bufSize) const; + void replaceSOGLColor(uint32_t *restrict pixels, + const int bufSize) const; /** * replace colors for OpenGL for A dye. */ - void replaceAOGLColor(uint32_t *pixels, const int bufSize) const; + void replaceAOGLColor(uint32_t *restrict pixels, + const int bufSize) const; static int hexDecode(const signed char c) A_WARN_UNUSED; @@ -110,8 +112,8 @@ class Dye final /** * Fills the blank in a dye placeholder with some palette names. */ - static void instantiate(std::string &target, - const std::string &palettes); + static void instantiate(std::string &restrict target, + const std::string &restrict palettes); /** * Return special dye palete (S) @@ -130,9 +132,9 @@ class Dye final */ int getType() const A_WARN_UNUSED; - void normalDye(uint32_t *pixels, const int bufSize) const; + void normalDye(uint32_t *restrict pixels, const int bufSize) const; - void normalOGLDye(uint32_t *pixels, const int bufSize) const; + void normalOGLDye(uint32_t *restrict pixels, const int bufSize) const; private: /** -- cgit v1.2.3-70-g09d2