From 866a71ffd576fd10c4e309195016d86f0c8ed635 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Sep 2012 21:58:08 +0300 Subject: Add const to more classes. --- src/resources/subimage.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/resources/subimage.cpp') 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); -- cgit v1.2.3-70-g09d2