summaryrefslogtreecommitdiffhomepage
path: root/src
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
parent94acd44723424f8ff5a9532c3030a637956c738a (diff)
external, src/world: add tsl::robin_map
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/world.hpp3
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');