summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-15 20:54:59 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-15 20:54:59 +0300
commit7b26645c1b28b212c011f98a5420c0989a7f0adc (patch)
tree0a3231b3cb54f415473c9834b88657b76b2668d6 /src/resources/imagehelper.h
parent054ed0b25bffc50588ff8c11a0aef4ee74c8136d (diff)
downloadmv-7b26645c1b28b212c011f98a5420c0989a7f0adc.tar.gz
mv-7b26645c1b28b212c011f98a5420c0989a7f0adc.tar.bz2
mv-7b26645c1b28b212c011f98a5420c0989a7f0adc.tar.xz
mv-7b26645c1b28b212c011f98a5420c0989a7f0adc.zip
improve imagehelper class.
Diffstat (limited to 'src/resources/imagehelper.h')
-rw-r--r--src/resources/imagehelper.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h
index e894bc66b..b55714787 100644
--- a/src/resources/imagehelper.h
+++ b/src/resources/imagehelper.h
@@ -59,30 +59,31 @@ class ImageHelper
* @return <code>NULL</code> if an error occurred, a valid pointer
* otherwise.
*/
- Image *load(SDL_RWops *const rw) A_WARN_UNUSED;
+ Image *load(SDL_RWops *const rw) const A_WARN_UNUSED;
#ifdef __GNUC__
- virtual Image *load(SDL_RWops *rw, Dye const &dye) A_WARN_UNUSED = 0;
+ virtual Image *load(SDL_RWops *const rw, Dye
+ const &dye) const A_WARN_UNUSED = 0;
- virtual Image *load(SDL_Surface *) A_WARN_UNUSED = 0;
+ virtual Image *load(SDL_Surface *const) const A_WARN_UNUSED = 0;
- virtual Image *createTextSurface(SDL_Surface *tmpImage,
- int width, int height,
- float alpha) A_WARN_UNUSED = 0;
+ virtual Image *createTextSurface(SDL_Surface *const tmpImage,
+ const int width, const int height,
+ float alpha) const A_WARN_UNUSED = 0;
- virtual int useOpenGL() A_WARN_UNUSED = 0;
+ virtual int useOpenGL() const A_WARN_UNUSED = 0;
#else
- virtual Image *load(SDL_RWops *rw, Dye const &dye) A_WARN_UNUSED
+ virtual Image *load(SDL_RWops *rw, Dye const &dye) const A_WARN_UNUSED
{ return nullptr; }
- virtual Image *load(SDL_Surface *) A_WARN_UNUSED
+ virtual Image *load(SDL_Surface *) const A_WARN_UNUSED
{ return nullptr; }
virtual Image *createTextSurface(SDL_Surface *const tmpImage,
- const float alpha) A_WARN_UNUSED
+ const float alpha) const A_WARN_UNUSED
{ return nullptr; }
- virtual int useOpenGL() A_WARN_UNUSED
+ virtual int useOpenGL() const A_WARN_UNUSED
{ return 0; }
#endif
@@ -92,7 +93,7 @@ class ImageHelper
void dumpSurfaceFormat(const SDL_Surface *const image) const;
virtual SDL_Surface *create32BitSurface(int width, int height)
- A_WARN_UNUSED = 0;
+ const A_WARN_UNUSED = 0;
static void setEnableAlpha(const bool n)
{ mEnableAlpha = n; }