summaryrefslogtreecommitdiff
path: root/src/gui/shortcut/emoteshortcut.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-08 21:20:53 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-08 21:20:53 +0300
commit64887d7ee931fa8426d25c4aaf0ee1a767d4a761 (patch)
tree038eb18058213ccbde5296686d3d687df610aac5 /src/gui/shortcut/emoteshortcut.h
parent91e74d8f1dc3f1fe01cb65822913488f5cbc5657 (diff)
downloadmanaverse-64887d7ee931fa8426d25c4aaf0ee1a767d4a761.tar.gz
manaverse-64887d7ee931fa8426d25c4aaf0ee1a767d4a761.tar.bz2
manaverse-64887d7ee931fa8426d25c4aaf0ee1a767d4a761.tar.xz
manaverse-64887d7ee931fa8426d25c4aaf0ee1a767d4a761.zip
Use size_t type for index in other shortcut classes.
Diffstat (limited to 'src/gui/shortcut/emoteshortcut.h')
-rw-r--r--src/gui/shortcut/emoteshortcut.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/shortcut/emoteshortcut.h b/src/gui/shortcut/emoteshortcut.h
index 14d68fbc6..282f12943 100644
--- a/src/gui/shortcut/emoteshortcut.h
+++ b/src/gui/shortcut/emoteshortcut.h
@@ -54,7 +54,7 @@ class EmoteShortcut final
*
* @param index Index of the shortcut Emote.
*/
- unsigned char getEmote(const int index) const A_WARN_UNUSED
+ unsigned char getEmote(const size_t index) const A_WARN_UNUSED
{ return mEmotes[index]; }
/**
@@ -74,7 +74,7 @@ class EmoteShortcut final
*
* @param index Index of the emotes.
*/
- void setEmote(const int index)
+ void setEmote(const size_t index)
{ mEmotes[index] = mEmoteSelected; }
/**
@@ -83,7 +83,8 @@ class EmoteShortcut final
* @param index Index of the emote.
* @param emoteId ID of the emote.
*/
- void setEmotes(const int index, const unsigned char emoteId)
+ void setEmotes(const size_t index,
+ const unsigned char emoteId)
{ mEmotes[index] = emoteId; }
/**
@@ -103,17 +104,17 @@ class EmoteShortcut final
/**
* Remove a Emote from the shortcut.
*/
- void removeEmote(const int index)
- { if (index >= 0 && index < SHORTCUT_EMOTES) mEmotes[index] = 0; }
+ void removeEmote(const size_t index)
+ { if (index < SHORTCUT_EMOTES) mEmotes[index] = 0; }
/**
* Try to use the Emote specified by the index.
*
* @param index Index of the emote shortcut.
*/
- void useEmote(const int index) const;
+ void useEmote(const size_t index) const;
- void useEmotePlayer(const int index) const;
+ void useEmotePlayer(const size_t index) const;
private:
/**