summaryrefslogtreecommitdiff
path: root/src/gui/shortcut/emoteshortcut.cpp
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.cpp
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.cpp')
-rw-r--r--src/gui/shortcut/emoteshortcut.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/shortcut/emoteshortcut.cpp b/src/gui/shortcut/emoteshortcut.cpp
index 0fcf4abaf..81b0e2b19 100644
--- a/src/gui/shortcut/emoteshortcut.cpp
+++ b/src/gui/shortcut/emoteshortcut.cpp
@@ -75,26 +75,24 @@ void EmoteShortcut::save() const
}
}
-void EmoteShortcut::useEmotePlayer(const int index) const
+void EmoteShortcut::useEmotePlayer(const size_t index) const
{
if (localPlayer == nullptr)
return;
- if (index > 0 &&
- index <= SHORTCUT_EMOTES)
+ if (index <= SHORTCUT_EMOTES)
{
if (mEmotes[index - 1] > 0)
localPlayer->emote(mEmotes[index - 1]);
}
}
-void EmoteShortcut::useEmote(const int index) const
+void EmoteShortcut::useEmote(const size_t index) const
{
if (localPlayer == nullptr)
return;
- if (index > 0 &&
- index <= SHORTCUT_EMOTES)
+ if (index <= SHORTCUT_EMOTES)
{
if (mEmotes[index - 1] > 0)
{