From 0534847df83047f1ce2605187d45a762ffeae11e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Sep 2012 21:25:21 +0300 Subject: Add const to more classes. --- src/resources/imageset.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/resources/imageset.h') diff --git a/src/resources/imageset.h b/src/resources/imageset.h index aef4bf694..4ff138d7f 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -38,7 +38,8 @@ class ImageSet : public Resource /** * Cuts the passed image in a grid of sub images. */ - ImageSet(Image *img, int w, int h, int margin = 0, int spacing = 0); + ImageSet(Image *const img, const int w, const int h, + const int margin = 0, const int spacing = 0); /** * Destructor. @@ -58,7 +59,8 @@ class ImageSet : public Resource { return mHeight; } typedef std::vector::size_type size_type; - Image* get(size_type i) const; + + Image* get(const size_type i) const; size_type size() const { return mImages.size(); } @@ -66,13 +68,13 @@ class ImageSet : public Resource int getOffsetX() const { return mOffsetX; } - void setOffsetX(int n) + void setOffsetX(const int n) { mOffsetX = n; } int getOffsetY() const { return mOffsetY; } - void setOffsetY(int n) + void setOffsetY(const int n) { mOffsetY = n; } private: -- cgit v1.2.3-70-g09d2