From 73fdd125814a44e497d2803a0bb824255738ab5c Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 3 Jul 2024 21:15:40 +0000 Subject: [PATCH] Use optimized container without dynamic memory allocations --- AI/Nullkiller/Pathfinding/AINodeStorage.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AI/Nullkiller/Pathfinding/AINodeStorage.h b/AI/Nullkiller/Pathfinding/AINodeStorage.h index 33455f350..3ac849851 100644 --- a/AI/Nullkiller/Pathfinding/AINodeStorage.h +++ b/AI/Nullkiller/Pathfinding/AINodeStorage.h @@ -23,6 +23,8 @@ constexpr int NKAI_GRAPH_TRACE_LEVEL = 0; #include "Actions/SpecialAction.h" #include "Actors.h" +#include + namespace NKAI { namespace AIPathfinding @@ -85,7 +87,9 @@ struct AIPathNodeInfo struct AIPath { - std::vector nodes; + using NodesVector = boost::container::small_vector; + + NodesVector nodes; uint64_t targetObjectDanger; uint64_t armyLoss; uint64_t targetObjectArmyLoss;