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

Fixes warnings about possibly dangling references

This commit is contained in:
Joakim Thorén
2023-12-27 22:24:58 +01:00
parent bb6179d05e
commit 406d136cdc
2 changed files with 6 additions and 9 deletions

View File

@@ -321,9 +321,7 @@ bool AINodeStorage::hasBetterChain(const PathNodeInfo & source, CDestinationNode
bool AINodeStorage::isTileAccessible(const int3 & pos, const EPathfindingLayer layer) const
{
const AIPathNode & node = nodes[layer][pos.z][pos.x][pos.y][0];
return node.action != EPathNodeAction::UNKNOWN;
return nodes[layer][pos.z][pos.x][pos.y][0].action != EPathNodeAction::UNKNOWN;
}
std::vector<AIPath> AINodeStorage::getChainInfo(const int3 & pos, bool isOnLand) const