diff options
author | Aaron Record <aaronjrecord@gmail.com> | 2022-05-18 17:43:40 -0600 |
---|---|---|
committer | Aaron Record <aaronjrecord@gmail.com> | 2022-05-19 12:09:16 +0200 |
commit | 900c676b0282bed83d00834e3c280ac89c2bc94d (patch) | |
tree | b6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /core/math | |
parent | 71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff) |
Use range iterators for RBSet in most cases
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/a_star.cpp | 6 |
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; |