diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/emoteshortcut.cpp | 9 | ||||
-rw-r--r-- | src/itemshortcut.cpp | 8 |
2 files changed, 3 insertions, 14 deletions
diff --git a/src/emoteshortcut.cpp b/src/emoteshortcut.cpp index 80376983..50879e4f 100644 --- a/src/emoteshortcut.cpp +++ b/src/emoteshortcut.cpp @@ -31,10 +31,6 @@ EmoteShortcut *emoteShortcut; EmoteShortcut::EmoteShortcut(): mEmoteSelected(0) { - for (int i = 0; i < SHORTCUT_EMOTES; i++) - { - mEmotes[i] = i + 1; - } load(); } @@ -49,10 +45,7 @@ void EmoteShortcut::load() { int emoteId = (int) config.getValue("emoteshortcut" + toString(i), i + 1); - if (emoteId) - { - mEmotes[i] = emoteId; - } + mEmotes[i] = emoteId; } } diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp index 50bd85b7..22cb64b3 100644 --- a/src/itemshortcut.cpp +++ b/src/itemshortcut.cpp @@ -30,14 +30,11 @@ #include "utils/stringutils.h" -ItemShortcut::ItemShortcut *itemShortcut; +ItemShortcut *itemShortcut; ItemShortcut::ItemShortcut(): mItemSelected(-1) { - for (int i = 0; i < SHORTCUT_ITEMS; i++) - mItems[i] = -1; - load(); } @@ -52,8 +49,7 @@ void ItemShortcut::load() { int itemId = (int) config.getValue("shortcut" + toString(i), -1); - if (itemId != -1) - mItems[i] = itemId; + mItems[i] = itemId; } } |