diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/action.cpp | 2 | ||||
-rw-r--r-- | src/resources/action.h | 2 | ||||
-rw-r--r-- | src/resources/iteminfo.cpp | 3 | ||||
-rw-r--r-- | src/resources/iteminfo.h | 6 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/resources/action.cpp b/src/resources/action.cpp index b4426daae..9b4d4b57a 100644 --- a/src/resources/action.cpp +++ b/src/resources/action.cpp @@ -40,7 +40,7 @@ Action::~Action() delete_all(mAnimations); } -Animation *Action::getAnimation(int direction) const +const Animation *Action::getAnimation(int direction) const { Animations::const_iterator i = mAnimations.find(direction); diff --git a/src/resources/action.h b/src/resources/action.h index 16f3d96d5..c3b4852b3 100644 --- a/src/resources/action.h +++ b/src/resources/action.h @@ -43,7 +43,7 @@ class Action final void setAnimation(const int direction, Animation *const animation); - Animation *getAnimation(int direction) const A_WARN_UNUSED; + const Animation *getAnimation(int direction) const A_WARN_UNUSED; unsigned getNumber() const A_WARN_UNUSED { return mNumber; } diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp index b4d1d5a69..dd86e3196 100644 --- a/src/resources/iteminfo.cpp +++ b/src/resources/iteminfo.cpp @@ -236,7 +236,8 @@ const std::string ItemInfo::replaceColors(std::string str, return replaceAll(str, "%Color%", name); } -SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(const int direction) const +const SpriteToItemMap *ItemInfo::getSpriteToItemReplaceMap(const int direction) + const { if (direction < 0 || direction >= 10) return nullptr; diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index 292089dc5..71a6119af 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -238,7 +238,7 @@ class ItemInfo final void setSpriteOrder(int *const ptr, const int direction, const int n, const int def = -1) const; - std::map<int, int> getTags() const A_WARN_UNUSED + const std::map<int, int> &getTags() const A_WARN_UNUSED { return mTags; } void addTag(const int tag) @@ -272,8 +272,8 @@ class ItemInfo final std::map<int, int> *addReplaceSprite(const int sprite, const int direction); - SpriteToItemMap *getSpriteToItemReplaceMap(const int directions) - const A_WARN_UNUSED; + const SpriteToItemMap *getSpriteToItemReplaceMap(const int directions) + const A_WARN_UNUSED; std::string getDyeColorsString(const int color) const A_WARN_UNUSED; |