1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

AI/BattleAI/BattleExchangeVariant.cpp: This function should be declared "const".

Member functions that don't mutate their objects should be declared "const"
This commit is contained in:
Alexander Wilms 2023-10-27 17:29:08 +00:00
parent af330ff038
commit b10b1a5444
2 changed files with 2 additions and 2 deletions

View File

@ -327,7 +327,7 @@ MoveTarget BattleExchangeEvaluator::findMoveTowardsUnreachable(
return result;
}
std::vector<const battle::Unit *> BattleExchangeEvaluator::getAdjacentUnits(const battle::Unit * blockerUnit)
std::vector<const battle::Unit *> BattleExchangeEvaluator::getAdjacentUnits(const battle::Unit * blockerUnit) const
{
std::queue<const battle::Unit *> queue;
std::vector<const battle::Unit *> checkedStacks;

View File

@ -129,7 +129,7 @@ public:
DamageCache & damageCache,
std::shared_ptr<HypotheticBattle> hb);
std::vector<const battle::Unit *> getAdjacentUnits(const battle::Unit * unit);
std::vector<const battle::Unit *> getAdjacentUnits(const battle::Unit * unit) const;
float getPositiveEffectMultiplier() { return 1; }
float getNegativeEffectMultiplier() { return negativeEffectMultiplier; }