summaryrefslogtreecommitdiff
path: root/src/resources/dye.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-17 17:55:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-17 17:55:43 +0300
commit07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c (patch)
tree2dcff26849f6133d9a1e08e2601a2b2ec8cc9d2d /src/resources/dye.h
parentfa1bd85d4461a0a35f8843ac0965e2de5fd6b27e (diff)
downloadplus-07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c.tar.gz
plus-07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c.tar.bz2
plus-07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c.tar.xz
plus-07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c.zip
add restrict keyword into dye class.
Diffstat (limited to 'src/resources/dye.h')
-rw-r--r--src/resources/dye.h18
1 files changed, 10 insertions, 8 deletions
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:
/**