1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Remove explicit convesion to int in operators

This commit is contained in:
Ivan Savenko
2023-11-05 18:58:07 +02:00
parent 10e110320b
commit abad4b01ce
35 changed files with 97 additions and 105 deletions

View File

@ -98,12 +98,7 @@ const CMapGenOptions& CMapGenerator::getMapGenOptions() const
void CMapGenerator::initPrisonsRemaining()
{
allowedPrisons = 0;
for (auto isAllowed : map->getMap(this).allowedHeroes)
{
if (isAllowed)
allowedPrisons++;
}
allowedPrisons = map->getMap(this).allowedHeroes.size();
allowedPrisons = std::max<int> (0, allowedPrisons - 16 * mapGenOptions.getHumanOrCpuPlayerCount()); //so at least 16 heroes will be available for every player
}