diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/world.hpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a03235e8..4aa9dbb4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,4 +7,5 @@ target_link_libraries( Magnum::Magnum Magnum::Shaders fmt::fmt + tsl::robin_map ) diff --git a/src/world.hpp b/src/world.hpp index 4b8ce797..90067c35 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -6,6 +6,7 @@ #include "compat/exception.hpp" #include <unordered_map> #include <memory> +#include <tsl/robin_map.h> template<> struct std::hash<floormat::chunk_coords_> final { @@ -31,7 +32,7 @@ private: } _last_chunk; std::unordered_map<chunk_coords_, chunk> _chunks; - std::unordered_map<object_id, std::weak_ptr<entity>> _entities; + tsl::robin_map<object_id, std::weak_ptr<entity>> _entities; size_t _last_collection = 0; size_t _collect_every = 64; std::shared_ptr<char> _unique_id = std::make_shared<char>('A'); |