summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-17 17:59:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-17 17:59:25 +0300
commitf08d1cf0131fbfa10950e7f67bab7f1f5b1736ae (patch)
treea587b54a0442c3c5a8c20cedfab6fc39d5406464 /src
parent07c3814e5e9c15dc0d5bdba9ba9a591e56116d7c (diff)
downloadplus-f08d1cf0131fbfa10950e7f67bab7f1f5b1736ae.tar.gz
plus-f08d1cf0131fbfa10950e7f67bab7f1f5b1736ae.tar.bz2
plus-f08d1cf0131fbfa10950e7f67bab7f1f5b1736ae.tar.xz
plus-f08d1cf0131fbfa10950e7f67bab7f1f5b1736ae.zip
add restrict into image.
Diffstat (limited to 'src')
-rw-r--r--src/resources/image.cpp7
-rw-r--r--src/resources/image.h7
2 files changed, 8 insertions, 6 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 8bf41aa4c..900d0348f 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -42,7 +42,8 @@
#include "debug.h"
#ifdef USE_SDL2
-Image::Image(SDL_Texture *const image, const int width, const int height) :
+Image::Image(SDL_Texture *restrict const image,
+ const int width, const int height) :
Resource(),
#ifdef USE_OPENGL
mGLImage(0),
@@ -85,8 +86,8 @@ Image::Image(SDL_Texture *const image, const int width, const int height) :
}
#endif
-Image::Image(SDL_Surface *const image, const bool hasAlphaChannel0,
- uint8_t *const alphaChannel) :
+Image::Image(SDL_Surface *restrict const image, const bool hasAlphaChannel0,
+ uint8_t *restrict const alphaChannel) :
Resource(),
#ifdef USE_OPENGL
mGLImage(0),
diff --git a/src/resources/image.h b/src/resources/image.h
index ee7191728..65bc0f338 100644
--- a/src/resources/image.h
+++ b/src/resources/image.h
@@ -203,11 +203,12 @@ class Image : public Resource
// -----------------------
/** SDL Constructor */
- Image(SDL_Surface *const image, const bool hasAlphaChannel,
- uint8_t *const alphaChannel = nullptr);
+ Image(SDL_Surface *restrict const image, const bool hasAlphaChannel,
+ uint8_t *restrict const alphaChannel = nullptr);
#ifdef USE_SDL2
- Image(SDL_Texture *const image, const int width, const int height);
+ Image(SDL_Texture *restrict const image,
+ const int width, const int height);
#endif
SDL_Surface *getByAlpha(const float alpha) A_WARN_UNUSED;