diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 16:21:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 16:35:24 +0300 |
commit | e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6 (patch) | |
tree | 9765a6516e4a6e284ed7b589090db7f1f4cd80ea /src/party.h | |
parent | 962f182fcc989ec587282e44f889188ce241ba31 (diff) | |
download | manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.gz manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.bz2 manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.tar.xz manaplus-e0ae701192472d7dd1ae80d78308c4f4a9ef4ec6.zip |
Add const to more classes.
Diffstat (limited to 'src/party.h')
-rw-r--r-- | src/party.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/party.h b/src/party.h index 0f7c6eee4..870122383 100644 --- a/src/party.h +++ b/src/party.h @@ -41,13 +41,13 @@ public: bool getLeader() const { return mLeader; } - void setLeader(bool leader) + void setLeader(const bool leader) { mLeader = leader; setDisplayBold(leader); } protected: friend class Party; - PartyMember(Party *party, int id, const std::string &name); + PartyMember(Party *const party, const int id, const std::string &name); Party *mParty; bool mLeader; @@ -66,14 +66,14 @@ public: /** * Adds member to the list. */ - PartyMember *addMember(int id, const std::string &name); + PartyMember *addMember(const int id, const std::string &name); /** * Find a member by ID. * * @return the member with the given ID, or NULL if they don't exist. */ - PartyMember *getMember(int id) const; + PartyMember *getMember(const int id) const; /** * Find a member by name. @@ -99,12 +99,12 @@ public: /** * Removes a member from the party. */ - void removeMember(PartyMember *member); + void removeMember(const PartyMember *const member); /** * Removes a member from the party. */ - void removeMember(int id); + void removeMember(const int id); /** * Removes a member from the party. @@ -123,7 +123,7 @@ public: int getNumberOfElements() { return static_cast<int>(mMembers.size()); } - Avatar *getAvatarAt(int i); + Avatar *getAvatarAt(const int i); /** * Get whether user can invite users to this party. @@ -132,11 +132,11 @@ public: bool getInviteRights() const { return mCanInviteUsers; } - void setRights(short rights); + void setRights(const short rights); - bool isMember(PartyMember *member) const; + bool isMember(const PartyMember *const member) const; - bool isMember(int id) const; + bool isMember(const int id) const; bool isMember(const std::string &name) const; @@ -151,7 +151,7 @@ public: MemberList *getMembers() { return &mMembers; } - static Party *getParty(short id); + static Party *getParty(const short id); static void clearParties(); @@ -162,7 +162,7 @@ private: /** * Constructor with party id passed to it. */ - Party(short id); + Party(const short id); virtual ~Party(); |