diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/point.cpp | 8 | ||||
-rw-r--r-- | src/world.hpp | 5 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/point.cpp b/src/point.cpp index 1c62b2ad..6cd2903b 100644 --- a/src/point.cpp +++ b/src/point.cpp @@ -8,13 +8,7 @@ size_t point::hash() const { constexpr size_t size = 2 * 2 + 1 + 1 + 2; static_assert(sizeof *this == size); -#ifdef FLOORMAT_64 - static_assert(sizeof nullptr > 4); - return hash_64(this, sizeof *this); -#else - static_assert(sizeof nullptr == 4); - return hash_32(this, sizeof *this); -#endif + return hash_buf(this, sizeof *this); } Debug& operator<<(Debug& dbg, const point& pt) diff --git a/src/world.hpp b/src/world.hpp index 420e8894..ecd58e3c 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -26,6 +26,8 @@ public: static constexpr float max_load_factor = .25; static constexpr size_t initial_collect_every = 64; + struct chunk_coords_hasher { size_t operator()(const chunk_coords_& coord) const noexcept; }; + private: struct chunk_tuple { @@ -35,9 +37,8 @@ private: } _last_chunk; struct object_id_hasher { size_t operator()(object_id id) const noexcept; }; - struct chunk_coords_hasher { size_t operator()(const chunk_coords_& coord) const noexcept; }; - struct robin_map_wrapper; + struct robin_map_wrapper; std::unordered_map<chunk_coords_, chunk, chunk_coords_hasher> _chunks; safe_ptr<robin_map_wrapper> _objects; std::shared_ptr<char> _unique_id = std::make_shared<char>('A'); |