diff options
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 04c8a5a943..8055dd4bc8 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -426,13 +426,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. @@ -469,7 +464,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) { |