Переглянути джерело

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

Redundant casts should not be used
Alexander Wilms 2 роки тому
батько
коміт
af330ff038
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      AI/BattleAI/BattleEvaluator.cpp

+ 2 - 2
AI/BattleAI/BattleEvaluator.cpp

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