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

Reduce usage of implicit conversions to int

This commit is contained in:
Ivan Savenko
2025-04-19 16:12:07 +03:00
parent 4d57a8ed36
commit 829739da24
64 changed files with 220 additions and 200 deletions

View File

@@ -88,7 +88,7 @@ bool AINodeStorage::isBattleNode(const CGPathNode * node) const
std::optional<AIPathNode *> AINodeStorage::getOrCreateNode(const int3 & pos, const EPathfindingLayer layer, int chainNumber)
{
auto chains = nodes[layer][pos.z][pos.x][pos.y];
auto chains = nodes[layer.getNum()][pos.z][pos.x][pos.y];
for(AIPathNode & node : chains)
{
@@ -125,7 +125,7 @@ void AINodeStorage::resetTile(const int3 & coord, EPathfindingLayer layer, EPath
{
for(int i = 0; i < NUM_CHAINS; i++)
{
AIPathNode & heroNode = nodes[layer][coord.z][coord.x][coord.y][i];
AIPathNode & heroNode = nodes[layer.getNum()][coord.z][coord.x][coord.y][i];
heroNode.chainMask = 0;
heroNode.danger = 0;
@@ -326,7 +326,7 @@ bool AINodeStorage::hasBetterChain(const PathNodeInfo & source, CDestinationNode
bool AINodeStorage::isTileAccessible(const int3 & pos, const EPathfindingLayer layer) const
{
return nodes[layer][pos.z][pos.x][pos.y][0].action != EPathNodeAction::UNKNOWN;
return nodes[layer.getNum()][pos.z][pos.x][pos.y][0].action != EPathNodeAction::UNKNOWN;
}
std::vector<AIPath> AINodeStorage::getChainInfo(const int3 & pos, bool isOnLand) const