1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-30 04:30:42 +02:00

Update BuildingBehavior.cpp

Fixed warning
This commit is contained in:
Xilmi 2024-08-19 21:15:25 +02:00
parent 00e5770aa3
commit e86ca49c37

View File

@ -58,7 +58,6 @@ Goals::TGoalVec BuildingBehavior::decompose(const Nullkiller * ai) const
{ {
closestThreat = std::min(closestThreat, threat.turn); closestThreat = std::min(closestThreat, threat.turn);
} }
int fortLevel = developmentInfo.town->fortLevel();
for (auto& buildingInfo : developmentInfo.toBuild) for (auto& buildingInfo : developmentInfo.toBuild)
{ {
if (closestThreat <= 1 && developmentInfo.town->fortLevel() < BuildingID::CASTLE && !buildingInfo.notEnoughRes) if (closestThreat <= 1 && developmentInfo.town->fortLevel() < BuildingID::CASTLE && !buildingInfo.notEnoughRes)