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

remove setting values that are never read

This commit is contained in:
Andrey Filipenkov 2022-09-24 16:12:02 +03:00
parent 2b0f02c832
commit 659be89a01
4 changed files with 2 additions and 6 deletions

View File

@ -205,8 +205,6 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
logAi->trace("checking %s", info.name);
logAi->trace("buildInfo %s", info.toString());
buildPtr = nullptr;
if(!town->hasBuilt(building))
{
auto canBuild = ai->cb->canBuildStructure(town, building);
@ -239,8 +237,6 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
}
else
{
buildPtr = townInfo->buildings.at(building);
logAi->trace("cant build. Need %d", missingBuildings[0].num);
BuildingInfo prerequisite = getBuildingOrPrerequisite(town, missingBuildings[0], excludeDwellingDependencies);

View File

@ -147,7 +147,6 @@ namespace AIPathfinding
return false;
}
destinationNode = questNode.get();
destination.node = questNode.get();
nodeStorage->commit(destination, source);

View File

@ -1230,7 +1230,7 @@ void CCreatureHandler::loadStackExp(Bonus & b, BonusList & bl, CLegacyConfigPars
{
if (b.type != Bonus::REBIRTH)
b.val = 0; //on-off ability, no value specified
curVal = static_cast<si32>(parser.readNumber());// 0 level is never active
parser.readNumber(); // 0 level is never active
for (int i = 1; i < 11; ++i)
{
curVal = static_cast<si32>(parser.readNumber());

View File

@ -304,6 +304,7 @@ std::vector<BattleHex> CStack::meleeAttackHexes(const battle::Unit * attacker, c
res.push_back(otherDefenderPos);
}
}
UNUSED(mask);
return res;
}