diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-24 22:48:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-24 22:48:35 +0300 |
commit | b474de4a54c9b1d4d863971e40b807588d554436 (patch) | |
tree | 761e71f86ea232d1688ee2838bd2294c59dea947 /src/gui/widgets/spellshortcutcontainer.cpp | |
parent | a316d537dce50f4b4e1e10f5c26a7851baddbd8b (diff) | |
download | mv-b474de4a54c9b1d4d863971e40b807588d554436.tar.gz mv-b474de4a54c9b1d4d863971e40b807588d554436.tar.bz2 mv-b474de4a54c9b1d4d863971e40b807588d554436.tar.xz mv-b474de4a54c9b1d4d863971e40b807588d554436.zip |
replace defines to consts.
Diffstat (limited to 'src/gui/widgets/spellshortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/spellshortcutcontainer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index a057eceb4..5236daec4 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -233,7 +233,8 @@ void SpellShortcutContainer::mouseReleased(gcn::MouseEvent &event) if (spell && !spell->isEmpty()) { int num = itemShortcutWindow->getTabIndex(); - if (num >= 0 && num < SHORTCUT_TABS && itemShortcut[num]) + if (num >= 0 && num < static_cast<int>(SHORTCUT_TABS) + && itemShortcut[num]) { itemShortcut[num]->setItemSelected( spell->getId() + SPELL_MIN_ID); @@ -244,8 +245,11 @@ void SpellShortcutContainer::mouseReleased(gcn::MouseEvent &event) else { int num = itemShortcutWindow->getTabIndex(); - if (num >= 0 && num < SHORTCUT_TABS && itemShortcut[num]) + if (num >= 0 && num < static_cast<int>(SHORTCUT_TABS) + && itemShortcut[num]) + { itemShortcut[num]->setItemSelected(-1); + } spellShortcut->setItemSelected(-1); } } |