summaryrefslogtreecommitdiff
path: root/src/resources/subimage.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-03 21:58:08 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 03:06:57 +0300
commit866a71ffd576fd10c4e309195016d86f0c8ed635 (patch)
tree21bbec175afc181cada529598267d62f12fcb671 /src/resources/subimage.cpp
parentebecb0cf42f2066943908fa158ac91527e0e6629 (diff)
downloadplus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.gz
plus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.bz2
plus-866a71ffd576fd10c4e309195016d86f0c8ed635.tar.xz
plus-866a71ffd576fd10c4e309195016d86f0c8ed635.zip
Add const to more classes.
Diffstat (limited to 'src/resources/subimage.cpp')
-rw-r--r--src/resources/subimage.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp
index 2dc7d4a7a..138805d24 100644
--- a/src/resources/subimage.cpp
+++ b/src/resources/subimage.cpp
@@ -31,8 +31,9 @@
#include "debug.h"
-SubImage::SubImage(Image *parent, SDL_Surface *image,
- int x, int y, int width, int height):
+SubImage::SubImage(Image *const parent, SDL_Surface *const image,
+ const int x, const int y,
+ const int width, const int height) :
Image(image),
mParent(parent)
{
@@ -77,9 +78,9 @@ SubImage::SubImage(Image *parent, SDL_Surface *image,
}
#ifdef USE_OPENGL
-SubImage::SubImage(Image *parent, GLuint image,
- int x, int y, int width, int height,
- int texWidth, int texHeight):
+SubImage::SubImage(Image *const parent, const GLuint image,
+ const int x, const int y, const int width, const int height,
+ const int texWidth, const int texHeight):
Image(image, width, height, texWidth, texHeight),
mParent(parent)
{
@@ -128,7 +129,8 @@ SubImage::~SubImage()
}
}
-Image *SubImage::getSubImage(int x, int y, int w, int h)
+Image *SubImage::getSubImage(const int x, const int y,
+ const int w, const int h)
{
if (mParent)
return mParent->getSubImage(mBounds.x + x, mBounds.y + y, w, h);