From 3eed2628ecb10a688f48db0c3cc7bac70dca22b7 Mon Sep 17 00:00:00 2001 From: Tametomo Date: Sun, 10 May 2009 14:45:44 -0600 Subject: 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 --- src/itemshortcut.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/itemshortcut.cpp') 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; } } -- cgit v1.2.3-70-g09d2