mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Use optimized container without dynamic memory allocations
This commit is contained in:
parent
1468abb8a0
commit
73fdd12581
@ -23,6 +23,8 @@ constexpr int NKAI_GRAPH_TRACE_LEVEL = 0;
|
||||
#include "Actions/SpecialAction.h"
|
||||
#include "Actors.h"
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
namespace NKAI
|
||||
{
|
||||
namespace AIPathfinding
|
||||
@ -85,7 +87,9 @@ struct AIPathNodeInfo
|
||||
|
||||
struct AIPath
|
||||
{
|
||||
std::vector<AIPathNodeInfo> nodes;
|
||||
using NodesVector = boost::container::small_vector<AIPathNodeInfo, 16>;
|
||||
|
||||
NodesVector nodes;
|
||||
uint64_t targetObjectDanger;
|
||||
uint64_t armyLoss;
|
||||
uint64_t targetObjectArmyLoss;
|
||||
|
Loading…
Reference in New Issue
Block a user