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:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user