diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 21:25:21 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 21:25:21 +0300 |
commit | 0534847df83047f1ce2605187d45a762ffeae11e (patch) | |
tree | 92365ee5ec086b3c65f024096df9d63bd05b31d4 /src/resources/imagehelper.cpp | |
parent | 4f390339f8107c376a10151a2cae889c0ec01089 (diff) | |
download | manaplus-0534847df83047f1ce2605187d45a762ffeae11e.tar.gz manaplus-0534847df83047f1ce2605187d45a762ffeae11e.tar.bz2 manaplus-0534847df83047f1ce2605187d45a762ffeae11e.tar.xz manaplus-0534847df83047f1ce2605187d45a762ffeae11e.zip |
Add const to more classes.
Diffstat (limited to 'src/resources/imagehelper.cpp')
-rw-r--r-- | src/resources/imagehelper.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp index 49442ec53..7ddf3221a 100644 --- a/src/resources/imagehelper.cpp +++ b/src/resources/imagehelper.cpp @@ -40,9 +40,9 @@ ImageHelper *imageHelper = nullptr; bool ImageHelper::mEnableAlpha = true; -Resource *ImageHelper::load(SDL_RWops *rw) +Resource *ImageHelper::load(SDL_RWops *const rw) { - SDL_Surface *tmpImage = IMG_Load_RW(rw, 1); + SDL_Surface *const tmpImage = IMG_Load_RW(rw, 1); if (!tmpImage) { @@ -50,13 +50,13 @@ Resource *ImageHelper::load(SDL_RWops *rw) return nullptr; } - Image *image = load(tmpImage); + Image *const image = load(tmpImage); SDL_FreeSurface(tmpImage); return image; } -SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface* tmpImage) +SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface *const tmpImage) { if (!tmpImage) return nullptr; @@ -96,7 +96,7 @@ SDL_Surface* ImageHelper::convertTo32Bit(SDL_Surface* tmpImage) return SDL_ConvertSurface(tmpImage, &RGBAFormat, SDL_SWSURFACE); } -void ImageHelper::dumpSurfaceFormat(SDL_Surface *image) +void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image) const { if (image->format) { |