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

Optimizations based on MSVS profiler.

This commit is contained in:
DJWarmonger
2018-12-16 15:46:48 +01:00
parent 34cc5dbec1
commit f4a8a1294e
3 changed files with 5 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ std::vector<CGPathNode *> AINodeStorage::calculateNeighbours(
const CPathfinderHelper * pathfinderHelper)
{
std::vector<CGPathNode *> neighbours;
neighbours.reserve(16);
const AIPathNode * srcNode = getAINode(source.node);
auto accessibleNeighbourTiles = pathfinderHelper->getNeighbourTiles(source);