From 98db78be9552b039090ce5dfc53803df2dd54b41 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Feb 2012 18:59:37 +0300 Subject: Add some missing getters. --- src/resources/action.h | 2 +- src/resources/image.h | 8 ++++---- src/resources/imageset.h | 4 ++-- src/resources/iteminfo.h | 5 +++-- src/resources/resource.h | 2 +- src/resources/resourcemanager.h | 6 +++--- 6 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/resources') diff --git a/src/resources/action.h b/src/resources/action.h index 1e3965363..3951cc02c 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -43,7 +43,7 @@ class Action Animation *getAnimation(int direction) const; - unsigned getNumber() + unsigned getNumber() const { return mNumber; } void setNumber(unsigned n) diff --git a/src/resources/image.h b/src/resources/image.h index d22ed4be2..68ab09e58 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -103,7 +103,7 @@ class Image : public Resource /** * Tells is the image is loaded */ - bool isLoaded() + bool isLoaded() const { return mLoaded; } /** @@ -217,16 +217,16 @@ class Image : public Resource static int mTextureType; #endif - bool isHasAlphaChannel() + bool isHasAlphaChannel() const { return mHasAlphaChannel; } - bool isAlphaVisible() + bool isAlphaVisible() const { return mIsAlphaVisible; } void setAlphaVisible(bool b) { mIsAlphaVisible = b; } - bool isAlphaCalculated() + bool isAlphaCalculated() const { return mIsAlphaCalculated; } void setAlphaCalculated(bool b) diff --git a/src/resources/imageset.h b/src/resources/imageset.h index 69ebebdc0..edfc4b123 100644 --- a/src/resources/imageset.h +++ b/src/resources/imageset.h @@ -63,13 +63,13 @@ class ImageSet : public Resource size_type size() const { return mImages.size(); } - int getOffsetX() + int getOffsetX() const { return mOffsetX; } void setOffsetX(int n) { mOffsetX = n; } - int getOffsetY() + int getOffsetY() const { return mOffsetY; } void setOffsetY(int n) diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 8c5e2dd8f..5f789663f 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -148,7 +148,8 @@ class ItemInfo void setEffect(const std::string &effect) { mEffect = effect; } - const std::string &getEffect() const { return mEffect; } + const std::string &getEffect() const + { return mEffect; } void setType(ItemType type) { mType = type; } @@ -250,7 +251,7 @@ class ItemInfo void setColorsList(std::string name); - bool isHaveColors() + bool isHaveColors() const { return !mColorList.empty(); } const std::string replaceColors(std::string str, diff --git a/src/resources/resource.h b/src/resources/resource.h index b8e06aaa7..c0ea7ca23 100644 --- a/src/resources/resource.h +++ b/src/resources/resource.h @@ -73,7 +73,7 @@ class Resource { return mRefCount; } #ifdef DEBUG_DUMP_LEAKS - bool getDumped() + bool getDumped() const { return mDumped; } void setDumped(bool n) diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 7b61e2eaa..9df96d354 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -254,17 +254,17 @@ class ResourceManager */ static void deleteInstance(); - int size() + int size() const { return mResources.size(); } typedef std::map Resources; typedef Resources::iterator ResourceIterator; #ifdef DEBUG_DUMP_LEAKS - Resources* getResources() + Resources* getResources() const { return &mResources; } - Resources* getOrphanedResources() + Resources* getOrphanedResources() const { return &mOrphanedResources; } #endif -- cgit v1.2.3-70-g09d2