summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-19 19:58:22 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-19 19:58:22 +0300
commit1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c (patch)
tree699956036b11b16cf4c740a83c6b32cd462b156a /src
parentdf54865fe22869e2a54cd667bbb4f27bea55c097 (diff)
downloadplus-1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c.tar.gz
plus-1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c.tar.bz2
plus-1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c.tar.xz
plus-1049de4c76ac6fc85c9f7f2bd35fb62ca787aa4c.zip
Fix cast issue in macosx.v1.7.8.19
Diffstat (limited to 'src')
-rw-r--r--src/gui/shortcut/shortcutbase.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/shortcut/shortcutbase.cpp b/src/gui/shortcut/shortcutbase.cpp
index 7bb11a8df..489805517 100644
--- a/src/gui/shortcut/shortcutbase.cpp
+++ b/src/gui/shortcut/shortcutbase.cpp
@@ -57,9 +57,10 @@ void ShortcutBase::load()
for (size_t i = 0; i < mMaxSize; i++)
{
- const int itemId = cfg->getValue(mItemName + toString(i), -1);
+ const std::string num = toString(CAST_S32(i));
+ const int itemId = cfg->getValue(mItemName + num, -1);
const ItemColor itemColor = fromInt(
- cfg->getValue(mColorName + toString(i), -1),
+ cfg->getValue(mColorName + num, -1),
ItemColor);
if (itemId != -1)
@@ -77,15 +78,16 @@ void ShortcutBase::save() const
const int itemId = mItems[i] != 0 ? mItems[i] : -1;
const int itemColor = (mItemColors[i] != ItemColor_zero)
? toInt(mItemColors[i], int) : 1;
+ const std::string num = toString(CAST_S32(i));
if (itemId != -1)
{
- serverConfig.setValue(mItemName + toString(i), itemId);
- serverConfig.setValue(mColorName + toString(i), itemColor);
+ serverConfig.setValue(mItemName + num, itemId);
+ serverConfig.setValue(mColorName + num, itemColor);
}
else
{
- serverConfig.deleteKey(mItemName + toString(i));
- serverConfig.deleteKey(mColorName + toString(i));
+ serverConfig.deleteKey(mItemName + num);
+ serverConfig.deleteKey(mColorName + num);
}
}
}