*/
struct BaseComponent {
public:
- typedef uint64_t Family;
+ typedef size_t Family;
// NOTE: Component memory is *always* managed by the EntityManager.
// Use Entity::destroy() instead.
template <typename C>
void remove(Entity::Id id) {
assert_valid(id);
- const int family = C::family();
- const int index = id.index();
+ const BaseComponent::Family family = C::family();
+ const uint32_t index = id.index();
ComponentHandle<C> component(this, id);
BasePool *pool = component_pools_[family];
event_manager_.emit<ComponentRemovedEvent<C>>(Entity(this, id), component);
#cmakedefine ENTITYX_MAX_COMPONENTS @ENTITYX_MAX_COMPONENTS@
-#include <stdint.h>
+#include <cstdint>
+#include <cstddef>
namespace entityx {
-static const uint64_t MAX_COMPONENTS = ENTITYX_MAX_COMPONENTS;
+static const size_t MAX_COMPONENTS = ENTITYX_MAX_COMPONENTS;
} // namespace entityx