1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Removed remaining usages of std::vector<bool>

This commit is contained in:
Ivan Savenko
2023-11-05 15:24:26 +02:00
parent a9f868b379
commit 0842f5afee
54 changed files with 140 additions and 317 deletions

View File

@@ -986,15 +986,13 @@ void CSpellHandler::beforeValidate(JsonNode & object)
inheritNode("expert");
}
std::vector<bool> CSpellHandler::getDefaultAllowed() const
std::set<SpellID> CSpellHandler::getDefaultAllowed() const
{
std::vector<bool> allowedSpells;
allowedSpells.reserve(objects.size());
std::set<SpellID> allowedSpells;
for(const CSpell * s : objects)
{
allowedSpells.push_back( !(s->isSpecial() || s->isCreatureAbility()));
}
if (!s->isSpecial() && !s->isCreatureAbility())
allowedSpells.insert(s->getId());
return allowedSpells;
}