diff options
author | Tametomo <irarice@gmail.com> | 2009-05-10 14:45:44 -0600 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 20:54:02 +0100 |
commit | 3eed2628ecb10a688f48db0c3cc7bac70dca22b7 (patch) | |
tree | 96bcc244c0fee8c1179c87078cf776c744288671 /src/itemshortcut.cpp | |
parent | 48ad9754e83a26d598b71e495d255915e873424f (diff) | |
download | mana-3eed2628ecb10a688f48db0c3cc7bac70dca22b7.tar.gz mana-3eed2628ecb10a688f48db0c3cc7bac70dca22b7.tar.bz2 mana-3eed2628ecb10a688f48db0c3cc7bac70dca22b7.tar.xz mana-3eed2628ecb10a688f48db0c3cc7bac70dca22b7.zip |
Some slight logic cleanups in the shortcut classes, as well as some
style cleanups.
TODO: Either abstract out all of the shared information between these
two classes to a parent class, or combine the two if it can be done
without doing it clumsily.
Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r-- | src/itemshortcut.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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; } } |