mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Reduced usage of global variables - removed or made const / constexpr
This commit is contained in:
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
return A->getNameTranslated() < B->getNameTranslated();
|
||||
}
|
||||
} spellsorter;
|
||||
};
|
||||
|
||||
CSpellWindow::CSpellWindow(const CGHeroInstance * _myHero, CPlayerInterface * _myInt, bool openOnBattleSpells):
|
||||
CWindowObject(PLAYER_COLORED | (settings["gameTweaks"]["enableLargeSpellbook"].Bool() ? BORDERED : 0)),
|
||||
@@ -293,6 +293,8 @@ void CSpellWindow::processSpells()
|
||||
if(!spell->isCreatureAbility() && myHero->canCastThisSpell(spell) && searchTextFound)
|
||||
mySpells.push_back(spell);
|
||||
}
|
||||
|
||||
SpellbookSpellSorter spellsorter;
|
||||
std::sort(mySpells.begin(), mySpells.end(), spellsorter);
|
||||
|
||||
//initializing sizes of spellbook's parts
|
||||
|
||||
Reference in New Issue
Block a user