1
0
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:
Ivan Savenko
2023-12-31 23:43:35 +02:00
parent bd5682ecc3
commit d5c4478816
55 changed files with 236 additions and 305 deletions

View File

@@ -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());