diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-30 02:10:59 +0300 |
commit | 46f0755975033f37eaae9db73c0e2b6499c2a923 (patch) | |
tree | 5c13c361ce4a4e4fd0e07fca1953c54637965666 /src/gui/whoisonline.h | |
parent | 1feb7f7edc5f8f383e594b256ef4cab0fae75b99 (diff) | |
download | ManaVerse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.gz ManaVerse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.bz2 ManaVerse-46f0755975033f37eaae9db73c0e2b6499c2a923.tar.xz ManaVerse-46f0755975033f37eaae9db73c0e2b6499c2a923.zip |
Add const to more classes.
Diffstat (limited to 'src/gui/whoisonline.h')
-rw-r--r-- | src/gui/whoisonline.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h index 1158ce03c..57778e2d4 100644 --- a/src/gui/whoisonline.h +++ b/src/gui/whoisonline.h @@ -49,8 +49,9 @@ namespace gcn class OnlinePlayer { public: - OnlinePlayer(std::string nick, unsigned char status, - char level, unsigned char gender, char version) : + OnlinePlayer(const std::string &nick, const unsigned char status, + const char level, const unsigned char gender, + const char version) : mNick(nick), mText(""), mStatus(status), @@ -67,7 +68,7 @@ class OnlinePlayer unsigned char getStaus() const { return mStatus; } - void setIsGM(bool b) + void setIsGM(const bool b) { mIsGM = b; } char getVersion() const @@ -81,7 +82,7 @@ class OnlinePlayer void setText(std::string str); - void setLevel(char level) + void setLevel(const char level) { mLevel = level; } private: @@ -138,13 +139,13 @@ public: void widgetResized(const gcn::Event &event); - const std::set<OnlinePlayer*> &getOnlinePlayers() + const std::set<OnlinePlayer*> &getOnlinePlayers() const { return mOnlinePlayers; } - const std::set<std::string> &getOnlineNicks() + const std::set<std::string> &getOnlineNicks() const { return mOnlineNicks; } - void setAllowUpdate(bool n) + void setAllowUpdate(const bool n) { mAllowUpdate = n; } void optionChanged(const std::string &name); |