Using std::vector.

This commit is contained in:
2024-06-06 03:01:55 +02:00
parent d6d2280676
commit 6c146078ec

View File

@@ -9,6 +9,7 @@
#define NODES(x, y) (_nodes[(x) + (y) * _width])
using namespace godot;
using std::vector;
static const int STRAIGHT_DISTANCE = 10;
static const int DIAGONAL_DISTANCE = 14;
@@ -154,7 +155,7 @@ void MultilevelAStarEx::init(const Rect2i &region)
_nodes.resize(_width * _height);
std::vector<Node>::iterator iter = _nodes.begin();
vector<Node>::iterator iter = _nodes.begin();
for (int y = 0; y < _height; y++)
{
for (int x = 0; x < _width; x++)