summaryrefslogtreecommitdiff
path: root/src/emoteshortcut.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-26 02:48:32 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-26 02:48:32 +0300
commitab596ef3f4215f792feaa9ca1dfe5acb74c67328 (patch)
treeac5a4f31e2fa9c784d7de8d817654d47e21ccac2 /src/emoteshortcut.h
parent399f264360f6e8dfa31d0c3ff7d72aad8033888d (diff)
downloadplus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.gz
plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.bz2
plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.tar.xz
plus-ab596ef3f4215f792feaa9ca1dfe5acb74c67328.zip
Add const to some classes.
Diffstat (limited to 'src/emoteshortcut.h')
-rw-r--r--src/emoteshortcut.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emoteshortcut.h b/src/emoteshortcut.h
index f43585a0e..e9c52827c 100644
--- a/src/emoteshortcut.h
+++ b/src/emoteshortcut.h
@@ -50,7 +50,7 @@ class EmoteShortcut
*
* @param index Index of the shortcut Emote.
*/
- unsigned char getEmote(int index) const
+ unsigned char getEmote(const int index) const
{ return mEmotes[index]; }
/**
@@ -70,7 +70,7 @@ class EmoteShortcut
*
* @param index Index of the emotes.
*/
- void setEmote(int index)
+ void setEmote(const int index)
{ mEmotes[index] = mEmoteSelected; }
/**
@@ -79,7 +79,7 @@ class EmoteShortcut
* @param index Index of the emote.
* @param emoteId ID of the emote.
*/
- void setEmotes(int index, unsigned char emoteId)
+ void setEmotes(const int index, const unsigned char emoteId)
{ mEmotes[index] = emoteId; }
/**
@@ -87,7 +87,7 @@ class EmoteShortcut
*
* @param emoteId The ID of the emote that is to be assigned.
*/
- void setEmoteSelected(unsigned char emoteId)
+ void setEmoteSelected(const unsigned char emoteId)
{ mEmoteSelected = emoteId; }
/**
@@ -99,7 +99,7 @@ class EmoteShortcut
/**
* Remove a Emote from the shortcut.
*/
- void removeEmote(int index)
+ void removeEmote(const int index)
{ if (index >= 0 && index < SHORTCUT_EMOTES) mEmotes[index] = 0; }
/**
@@ -107,13 +107,13 @@ class EmoteShortcut
*
* @param index Index of the emote shortcut.
*/
- void useEmote(int index);
+ void useEmote(const int index) const;
private:
/**
* Save the configuration information.
*/
- void save();
+ void save() const;
unsigned char mEmotes[SHORTCUT_EMOTES]; /**< The emote stored. */
unsigned char mEmoteSelected; /**< The emote held