mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Remove most of non-const access to VLC entities
This commit is contained in:
@@ -969,7 +969,7 @@ CSpell * CSpellHandler::loadFromJson(const std::string & scope, const JsonNode &
|
||||
|
||||
void CSpellHandler::afterLoadFinalization()
|
||||
{
|
||||
for(auto spell : objects)
|
||||
for(auto & spell : objects)
|
||||
{
|
||||
spell->setupMechanics();
|
||||
}
|
||||
@@ -997,7 +997,7 @@ std::set<SpellID> CSpellHandler::getDefaultAllowed() const
|
||||
{
|
||||
std::set<SpellID> allowedSpells;
|
||||
|
||||
for(const CSpell * s : objects)
|
||||
for(auto const & s : objects)
|
||||
if (!s->isSpecial() && !s->isCreatureAbility())
|
||||
allowedSpells.insert(s->getId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user