From c430b75e370a21a17f80d4ba3acd84111828a462 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 26 Sep 2013 20:08:44 +0300 Subject: add const for methods return values. --- src/being/being.cpp | 4 ++-- src/being/being.h | 6 +++--- src/being/compoundsprite.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index 82e4da2f9..bcf444df3 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -870,7 +870,7 @@ void Being::removeGuild(const int id) mGuilds.erase(id); } -Guild *Being::getGuild(const std::string &guildName) const +const Guild *Being::getGuild(const std::string &guildName) const { FOR_EACH (GuildsMapCIter, itr, mGuilds) { @@ -882,7 +882,7 @@ Guild *Being::getGuild(const std::string &guildName) const return nullptr; } -Guild *Being::getGuild(const int id) const +const Guild *Being::getGuild(const int id) const { const std::map::const_iterator itr = mGuilds.find(id); if (itr != mGuilds.end()) diff --git a/src/being/being.h b/src/being/being.h index 1668d17eb..ddc083c34 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -322,12 +322,12 @@ class Being : public ActorSprite, public ConfigListener /** * Returns a pointer to the specified guild that the being is in. */ - Guild *getGuild(const std::string &guildName) const A_WARN_UNUSED; + const Guild *getGuild(const std::string &guildName) const A_WARN_UNUSED; /** * Returns a pointer to the specified guild that the being is in. */ - Guild *getGuild(const int id) const A_WARN_UNUSED; + const Guild *getGuild(const int id) const A_WARN_UNUSED; /** * Returns a pointer to the specified guild that the being is in. @@ -425,7 +425,7 @@ class Being : public ActorSprite, public ConfigListener const BeingInfo *getInfo() const A_WARN_UNUSED { return mInfo; } - TargetCursorSize getTargetCursorSize() const A_WARN_UNUSED; + TargetCursorSize getTargetCursorSize() const override A_WARN_UNUSED; int getTargetOffsetX() const A_WARN_UNUSED { diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h index d8c0cf849..5cdebd6d6 100644 --- a/src/being/compoundsprite.h +++ b/src/being/compoundsprite.h @@ -31,7 +31,7 @@ class Image; -typedef std::list VectorPointers; +typedef std::list VectorPointers; class CompoundItem final { -- cgit v1.2.3-60-g2f50