summaryrefslogtreecommitdiff
path: root/src/resources/imagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-02 21:25:21 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 21:25:21 +0300
commit0534847df83047f1ce2605187d45a762ffeae11e (patch)
tree92365ee5ec086b3c65f024096df9d63bd05b31d4 /src/resources/imagehelper.cpp
parent4f390339f8107c376a10151a2cae889c0ec01089 (diff)
downloadplus-0534847df83047f1ce2605187d45a762ffeae11e.tar.gz
plus-0534847df83047f1ce2605187d45a762ffeae11e.tar.bz2
plus-0534847df83047f1ce2605187d45a762ffeae11e.tar.xz
plus-0534847df83047f1ce2605187d45a762ffeae11e.zip
Add const to more classes.
Diffstat (limited to 'src/resources/imagehelper.cpp')
-rw-r--r--src/resources/imagehelper.cpp10
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)
{