diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 09:03:38 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-10 10:35:00 +0200 |
commit | 42214976648e768d0a525dd6e5f84a1f300c25ae (patch) | |
tree | 2309ca7af25cb04bcdfbcef0b294fb65bee91b00 /src | |
parent | 94acd44723424f8ff5a9532c3030a637956c738a (diff) |
external, src/world: add tsl::robin_map
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'); |