diff options
author | George L. Albany <Megacake1234@gmail.com> | 2024-11-11 16:19:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-11 16:19:19 +0000 |
commit | 5094c2a5f7d506b0e685120f14d1df42e1e9d495 (patch) | |
tree | a10abf56ba93705731da1aaf338f2cf21403c6ad /modules/navigation/nav_map.cpp | |
parent | e7894c2c4efdd51049a21af4892005381fe57cd6 (diff) | |
parent | 62fbec9f6f0722a1f9825c17f073742932082228 (diff) | |
download | redot-engine-5094c2a5f7d506b0e685120f14d1df42e1e9d495.tar.gz |
Merge pull request #853 from Spartan322/merge/0f5f3bc
Merge commit godotengine/godot@0f5f3bc
Diffstat (limited to 'modules/navigation/nav_map.cpp')
-rw-r--r-- | modules/navigation/nav_map.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index e4c41925a9..38bb70568f 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -428,13 +428,8 @@ void NavMap::sync() { _new_pm_polygon_count = polygon_count; - struct ConnectionPair { - gd::Edge::Connection connections[2]; - int size = 0; - }; - // Group all edges per key. - HashMap<gd::EdgeKey, ConnectionPair, gd::EdgeKey> connection_pairs_map; + connection_pairs_map.clear(); connection_pairs_map.reserve(polygons.size()); int free_edges_count = 0; // How many ConnectionPairs have only one Connection. @@ -471,7 +466,7 @@ void NavMap::sync() { } } - LocalVector<gd::Edge::Connection> free_edges; + free_edges.clear(); free_edges.reserve(free_edges_count); for (const KeyValue<gd::EdgeKey, ConnectionPair> &pair_it : connection_pairs_map) { |