diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 23:42:07 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-18 23:42:07 +0100 |
commit | 4d9a82b720c8ce74b94f43f72ddd819ef21abbdf (patch) | |
tree | c0a5d21b8e19fbb60c286faec8e302e6f32b6679 /src/world.cpp | |
parent | 32b8c22828315292857e2cd9909fba620f30ff70 (diff) |
pre-declare integer types without cstddef/cstdint
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/world.cpp b/src/world.cpp index d6099302..7dab8dee 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -49,7 +49,7 @@ world::~world() noexcept _entities.clear(); } -world::world(std::size_t capacity) : _chunks{capacity, hasher} +world::world(size_t capacity) : _chunks{capacity, hasher} { _chunks.max_load_factor(max_load_factor); } @@ -126,14 +126,14 @@ void world::do_make_entity(const std::shared_ptr<entity>& e, global_coords pos, e->c->add_entity_unsorted(e); } -void world::do_kill_entity(std::uint64_t id) +void world::do_kill_entity(object_id id) { fm_debug_assert(id > 0); auto cnt = _entities.erase(id); fm_debug_assert(cnt > 0); } -std::shared_ptr<entity> world::find_entity_(std::uint64_t id) +std::shared_ptr<entity> world::find_entity_(object_id id) { auto it = _entities.find(id); auto ret = it == _entities.end() ? nullptr : it->second.lock(); @@ -141,7 +141,7 @@ std::shared_ptr<entity> world::find_entity_(std::uint64_t id) return ret; } -void world::set_entity_counter(std::uint64_t value) +void world::set_entity_counter(object_id value) { fm_assert(value >= _entity_counter); _entity_counter = value; |