From 7525bcd3024697e233091012d994cb86e9a05179 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Dec 2015 14:55:32 +0300 Subject: Add restrict keyword in dyepalette. --- src/resources/dye/dyepalette.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/resources/dye/dyepalette.h') diff --git a/src/resources/dye/dyepalette.h b/src/resources/dye/dyepalette.h index 1269d1511..8f30cfd2f 100644 --- a/src/resources/dye/dyepalette.h +++ b/src/resources/dye/dyepalette.h @@ -41,7 +41,8 @@ class DyePalette final * The string is either a file name or a sequence of hexadecimal RGB * values separated by ',' and starting with '#'. */ - DyePalette(const std::string &pallete, const uint8_t blockSize); + DyePalette(const std::string &restrict pallete, + const uint8_t blockSize); A_DELETE_COPY(DyePalette) @@ -50,34 +51,37 @@ class DyePalette final * implicitly black (0, 0, 0). */ void getColor(const unsigned int intensity, - unsigned int (&color)[3]) const; + unsigned int (&restrict color)[3]) const restrict2; /** * Gets a pixel color depending on its intensity. */ - void getColor(double intensity, int (&color)[3]) const; + void getColor(double intensity, + int (&restrict color)[3]) const restrict2; /** * replace colors for SDL for S dye. */ - void replaceSColor(uint32_t *restrict pixels, const int bufSize) const; + void replaceSColor(uint32_t *restrict pixels, + const int bufSize) const restrict2; /** - * replace colors for SDL for S dye. + * replace colors for SDL for A dye. */ - void replaceAColor(uint32_t *restrict pixels, const int bufSize) const; + void replaceAColor(uint32_t *restrict pixels, + const int bufSize) const restrict2; /** * replace colors for OpenGL for S dye. */ void replaceSOGLColor(uint32_t *restrict pixels, - const int bufSize) const; + const int bufSize) const restrict2; /** * replace colors for OpenGL for A dye. */ void replaceAOGLColor(uint32_t *restrict pixels, - const int bufSize) const; + const int bufSize) const restrict2; static unsigned int hexDecode(const signed char c) A_CONST A_WARN_UNUSED; -- cgit v1.2.3-70-g09d2