1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

fix variable type in for-in loops

This commit is contained in:
Andrey Filipenkov
2022-09-22 11:02:36 +03:00
parent a1cf120ea6
commit aae1d4fed5
2 changed files with 2 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ uint64_t getCreatureBankArmyReward(const CGObjectInstance * target, const CGHero
{ {
//No free slot, we might discard our weakest stack //No free slot, we might discard our weakest stack
weakestStackPower = std::numeric_limits<ui64>().max(); weakestStackPower = std::numeric_limits<ui64>().max();
for (const auto stack : slots) for (const auto & stack : slots)
{ {
vstd::amin(weakestStackPower, stack.second->getPower()); vstd::amin(weakestStackPower, stack.second->getPower());
} }

View File

@@ -121,7 +121,7 @@ Goals::TSubgoal ResourceManager::collectResourcesForOurGoal(ResourceObjective &o
} }
float goalPriority = 10; //arbitrary, will be divided float goalPriority = 10; //arbitrary, will be divided
for (const resPair & p : missingResources) for (const resPair p : missingResources)
{ {
if (!income[p.first]) //prioritize resources with 0 income if (!income[p.first]) //prioritize resources with 0 income
{ {