summaryrefslogtreecommitdiff
path: root/core/math/a_star.cpp
diff options
context:
space:
mode:
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 a3ee259030..29aa959e54 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -293,10 +293,10 @@ Vector3 AStar3D::get_closest_position_in_segment(const Vector3 &p_point) const {
real_t closest_dist = 1e20;
Vector3 closest_point;
- for (const RBSet<Segment>::Element *E = segments.front(); E; E = E->next()) {
+ for (const Segment &E : segments) {
Point *from_point = nullptr, *to_point = nullptr;
- points.lookup(E->get().u, from_point);
- points.lookup(E->get().v, to_point);
+ points.lookup(E.u, from_point);
+ points.lookup(E.v, to_point);
if (!(from_point->enabled && to_point->enabled)) {
continue;