summaryrefslogtreecommitdiff
path: root/src/gui/shortcut/itemshortcut.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/gui/shortcut/itemshortcut.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/gui/shortcut/itemshortcut.cpp')
-rw-r--r--src/gui/shortcut/itemshortcut.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/shortcut/itemshortcut.cpp b/src/gui/shortcut/itemshortcut.cpp
index 8c091f8c1..f47bfd296 100644
--- a/src/gui/shortcut/itemshortcut.cpp
+++ b/src/gui/shortcut/itemshortcut.cpp
@@ -121,9 +121,9 @@ void ItemShortcut::save() const
{
const int itemId = mItems[i] != 0 ? mItems[i] : -1;
const int itemColor = toInt(mItemColors[i], int);
- const std::string itemData = mItemData[i];
if (itemId != -1)
{
+ const std::string itemData = mItemData[i];
serverConfig.setValue(name + toString(i), itemId);
serverConfig.setValue(color + toString(i), itemColor);
serverConfig.setValue(data + toString(i), itemData);