diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-22 19:41:55 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-02-22 19:43:02 +0100 |
commit | 96c9743e65ac95706be3f49da3254d8db4c3afba (patch) | |
tree | a839dea2f7c8c79b054d82b99cc794dd0e0f818b /src/world.hpp | |
parent | b3b770bffcd9f330ab171a7c74558e861e824c9e (diff) |
src/{world,dijkstra}: get rid of extra indirection in neighbor list
Diffstat (limited to 'src/world.hpp')
-rw-r--r-- | src/world.hpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/world.hpp b/src/world.hpp index 8e6b9815..20d9bd1d 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -96,9 +96,7 @@ public: [[nodiscard]] object_id make_id() { return ++_object_counter; } void set_object_counter(object_id value); - struct neighbor_pair final { chunk* c = nullptr; chunk_coords_ coord; }; - - std::array<neighbor_pair, 8> neighbors(chunk_coords_ coord); + std::array<chunk*, 8> neighbors(chunk_coords_ coord); static constexpr std::array<Vector2b, 8> neighbor_offsets = {{ {-1, -1}, {-1, 0}, { 0, -1}, { 1, 1}, { 1, 0}, { 0, 1}, { 1, -1}, {-1, 1}, |