Using std::vector.
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#define NODES(x, y) (_nodes[(x) + (y) * _width])
|
#define NODES(x, y) (_nodes[(x) + (y) * _width])
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
using std::vector;
|
||||||
|
|
||||||
static const int STRAIGHT_DISTANCE = 10;
|
static const int STRAIGHT_DISTANCE = 10;
|
||||||
static const int DIAGONAL_DISTANCE = 14;
|
static const int DIAGONAL_DISTANCE = 14;
|
||||||
@@ -154,7 +155,7 @@ void MultilevelAStarEx::init(const Rect2i ®ion)
|
|||||||
|
|
||||||
_nodes.resize(_width * _height);
|
_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 y = 0; y < _height; y++)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < _width; x++)
|
for (int x = 0; x < _width; x++)
|
||||||
|
|||||||
Reference in New Issue
Block a user