summaryrefslogtreecommitdiffhomepage
path: root/src/world.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-10 09:03:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-10 10:35:00 +0200
commit42214976648e768d0a525dd6e5f84a1f300c25ae (patch)
tree2309ca7af25cb04bcdfbcef0b294fb65bee91b00 /src/world.hpp
parent94acd44723424f8ff5a9532c3030a637956c738a (diff)
external, src/world: add tsl::robin_map
Diffstat (limited to 'src/world.hpp')
-rw-r--r--src/world.hpp3
1 files changed, 2 insertions, 1 deletions
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');