From 84a899775b86a1e44b2327cb35ef45a393f161d6 Mon Sep 17 00:00:00 2001 From: Israël Hallé Date: Mon, 4 Aug 2014 16:03:32 -0400 Subject: Uses bitmask function to set bit --- entityx/Entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entityx/Entity.h b/entityx/Entity.h index e4192db..7312e25 100644 --- a/entityx/Entity.h +++ b/entityx/Entity.h @@ -506,7 +506,7 @@ class EntityManager : entityx::help::NonCopyable { Pool *pool = accomodate_component(); new(pool->get(id.index())) C(std::forward(args) ...); ComponentHandle component(this, id); - entity_component_mask_[id.index()] |= uint64_t(1) << family; + entity_component_mask_[id.index()].set(family); event_manager_.emit>(Entity(this, id), component); return component; } @@ -524,7 +524,7 @@ class EntityManager : entityx::help::NonCopyable { ComponentHandle component(this, id); BasePool *pool = component_pools_[family]; event_manager_.emit>(Entity(this, id), component); - entity_component_mask_[id.index()] &= ~(uint64_t(1) << family); + entity_component_mask_[id.index()].reset(family); pool->destroy(index); } -- cgit v1.2.3