diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-12 10:04:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 10:04:45 +0100 |
commit | 189662e5bdd5347ed9f8c2a4711bddd7037c5362 (patch) | |
tree | c076f1d5132092185f6bc12e03d88d86a9a52200 /core/math/a_star.cpp | |
parent | e664d195cbaa5ebc7a9926a8afc432296ff08588 (diff) | |
parent | 6c3a0460a803b3dbe89a4172c49f38fc4b95a299 (diff) |
Merge pull request #56696 from AnilBK/use-init-lists
Diffstat (limited to 'core/math/a_star.cpp')
-rw-r--r-- | core/math/a_star.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index ebe88fcf66..ce2435216b 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -699,8 +699,7 @@ Vector<Vector2> AStar2D::get_point_path(int p_from_id, int p_to_id) { ERR_FAIL_COND_V_MSG(!to_exists, Vector<Vector2>(), vformat("Can't get point path. Point with id: %d doesn't exist.", p_to_id)); if (a == b) { - Vector<Vector2> ret; - ret.push_back(Vector2(a->pos.x, a->pos.y)); + Vector<Vector2> ret = { Vector2(a->pos.x, a->pos.y) }; return ret; } |