1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

AI/BattleAI/BattleEvaluator.cpp: Remove this redundant cast.

Redundant casts should not be used
This commit is contained in:
Alexander Wilms 2023-10-27 17:23:54 +00:00
parent 10ad5b6789
commit af330ff038

View File

@ -58,7 +58,7 @@ std::vector<BattleHex> BattleEvaluator::getBrokenWallMoatHexes() const
if(state != EWallState::DESTROYED)
continue;
auto wallHex = cb->getBattle(battleID)->wallPartToBattleHex((EWallPart)wallPart);
auto wallHex = cb->getBattle(battleID)->wallPartToBattleHex(wallPart);
auto moatHex = wallHex.cloneInDirection(BattleHex::LEFT);
result.push_back(moatHex);
@ -142,7 +142,7 @@ BattleAction BattleEvaluator::selectStackAction(const CStack * stack)
logAi->debug("BattleAI: %s -> %s x %d, from %d curpos %d dist %d speed %d: +%2f -%2f = %2f",
bestAttack.attackerState->unitType()->getJsonKey(),
bestAttack.affectedUnits[0]->unitType()->getJsonKey(),
(int)bestAttack.affectedUnits[0]->getCount(),
bestAttack.affectedUnits[0]->getCount(),
(int)bestAttack.from,
(int)bestAttack.attack.attacker->getPosition().hex,
bestAttack.attack.chargeDistance,