1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Fixed warnings.

This commit is contained in:
AlexVinS
2019-01-08 00:40:09 +03:00
parent 9ec3d2ef64
commit f1cd4656ff
5 changed files with 24 additions and 26 deletions

View File

@@ -63,7 +63,7 @@ boost::optional<AIPathNode *> AINodeStorage::getOrCreateNode(const int3 & pos, c
CGPathNode * AINodeStorage::getInitialNode()
{
auto hpos = hero->getPosition(false);
auto initialNode =
auto initialNode =
getOrCreateNode(hpos, hero->boat ? EPathfindingLayer::SAIL : EPathfindingLayer::LAND, NORMAL_CHAIN)
.get();
@@ -99,7 +99,7 @@ void AINodeStorage::commit(CDestinationNodeInfo & destination, const PathNodeInf
dstNode->action = destination.action;
dstNode->theNodeBefore = srcNode->theNodeBefore;
dstNode->manaCost = srcNode->manaCost;
if(dstNode->specialAction)
{
dstNode->specialAction->applyOnDestination(getHero(), destination, source, dstNode, srcNode);
@@ -193,7 +193,6 @@ bool AINodeStorage::isTileAccessible(int3 pos, const EPathfindingLayer layer) co
{
std::vector<AIPath> paths;
auto chains = nodes[pos.x][pos.y][pos.z][layer];
auto initialPos = hero->visitablePos();
for(const AIPathNode & node : chains)
{

View File

@@ -77,9 +77,9 @@ namespace AIPathfinding
bool isAffordableBy(HeroPtr hero, const AIPathNode * source) const
{
logAi->trace(
"Hero %s has %d mana and needed %d and already spent %d",
hero->name,
hero->mana,
"Hero %s has %d mana and needed %d and already spent %d",
hero->name,
hero->mana,
getManaCost(hero),
source->manaCost);
@@ -215,7 +215,7 @@ namespace AIPathfinding
}
bool tryEmbarkVirtualBoat(
CDestinationNodeInfo &destination,
CDestinationNodeInfo &destination,
const PathNodeInfo &source,
std::shared_ptr<const VirtualBoatAction> virtualBoat) const
{
@@ -232,7 +232,7 @@ namespace AIPathfinding
{
AIPathNode * boatNode = boatNodeOptional.get();
if(boatNode->action == CGPathNode::NOT_SET)
if(boatNode->action == CGPathNode::UNKNOWN)
{
boatNode->specialAction = virtualBoat;
destination.blocked = false;