From f98d003e354a1792117b7cbc771d1dd91475a156 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Mar 2011 17:48:29 +0200 Subject: Fix most old style cast except manaserv and libxml2 defines. --- src/spellmanager.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/spellmanager.cpp') diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index fb0a338d5..ef630fc67 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -52,7 +52,7 @@ SpellManager::~SpellManager() TextCommand* SpellManager::getSpell(int spellId) { - if (spellId < 0 || (unsigned int)spellId >= mSpells.size()) + if (spellId < 0 || static_cast(spellId) >= mSpells.size()) return NULL; return mSpells[spellId]; @@ -273,15 +273,16 @@ void SpellManager::load(bool oldConfig) std::string icon = cfg->getValue("commandShortcutIcon" + toString(i), ""); - if ((TextCommandType)commandType == TEXT_COMMAND_MAGIC) + if (static_cast(commandType) == TEXT_COMMAND_MAGIC) { - addSpell(new TextCommand(i, symbol, cmd, (SpellTarget)targetType, - icon, basicLvl, (MagicSchool)school, schoolLvl, mana)); + addSpell(new TextCommand(i, symbol, cmd, + static_cast(targetType), icon, basicLvl, + static_cast(school), schoolLvl, mana)); } else { - addSpell(new TextCommand(i, symbol, cmd, (SpellTarget)targetType, - icon)); + addSpell(new TextCommand(i, symbol, cmd, + static_cast(targetType), icon)); } } } -- cgit v1.2.3-70-g09d2