summaryrefslogtreecommitdiffhomepage
path: root/src/path-search.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-22 19:41:55 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-22 19:43:02 +0100
commit96c9743e65ac95706be3f49da3254d8db4c3afba (patch)
treea839dea2f7c8c79b054d82b99cc794dd0e0f818b /src/path-search.cpp
parentb3b770bffcd9f330ab171a7c74558e861e824c9e (diff)
src/{world,dijkstra}: get rid of extra indirection in neighbor list
Diffstat (limited to 'src/path-search.cpp')
-rw-r--r--src/path-search.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path-search.cpp b/src/path-search.cpp
index f5a36feb..2b93ad14 100644
--- a/src/path-search.cpp
+++ b/src/path-search.cpp
@@ -46,7 +46,7 @@ bool path_search::is_passable_1(chunk& c, Vector2 min, Vector2 max, object_id ow
return is_passable;
}
-bool path_search::is_passable_(chunk* c0, const std::array<world::neighbor_pair, 8>& neighbors,
+bool path_search::is_passable_(chunk* c0, const std::array<chunk*, 8>& neighbors,
Vector2 min, Vector2 max, object_id own_id, const pred& p)
{
fm_debug_assert(max >= min);
@@ -60,7 +60,7 @@ bool path_search::is_passable_(chunk* c0, const std::array<world::neighbor_pair,
for (auto i = 0uz; i < 8; i++)
{
auto nb = world::neighbor_offsets[i];
- auto* c2 = neighbors[i].c;
+ auto* c2 = neighbors[i];
if (c2)
{