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:
parent
af330ff038
commit
b10b1a5444
@ -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;
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user