summaryrefslogtreecommitdiff
path: root/core/math/a_star.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-15 12:04:21 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-12-28 10:39:56 +0000
commit5b937d493f0046543a77a0be7920ad39f1e5fc3c (patch)
tree975e0a7384bc6fc7cf5b73b9ddc1e8eef13579d8 /core/math/a_star.cpp
parent886571e0fc54914f161ab3f1ccf9bfe40411bc20 (diff)
Rename empty() to is_empty()
Diffstat (limited to 'core/math/a_star.cpp')
-rw-r--r--core/math/a_star.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index b4410acf7d..6b97cba9f9 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -35,7 +35,7 @@
#include "scene/scene_string_names.h"
int AStar::get_available_point_id() const {
- if (points.empty()) {
+ if (points.is_empty()) {
return 1;
}
@@ -341,7 +341,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) {
begin_point->f_score = _estimate_cost(begin_point->id, end_point->id);
open_list.push_back(begin_point);
- while (!open_list.empty()) {
+ while (!open_list.is_empty()) {
Point *p = open_list[0]; // The currently processed point
if (p == end_point) {
@@ -805,7 +805,7 @@ bool AStar2D::_solve(AStar::Point *begin_point, AStar::Point *end_point) {
begin_point->f_score = _estimate_cost(begin_point->id, end_point->id);
open_list.push_back(begin_point);
- while (!open_list.empty()) {
+ while (!open_list.is_empty()) {
AStar::Point *p = open_list[0]; // The currently processed point
if (p == end_point) {