diff options
author | Alec Thomas <alec@swapoff.org> | 2014-07-31 09:36:34 +1000 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2014-07-31 09:37:51 +1000 |
commit | e53e3dae11a5904194941cfb436b2430673740d1 (patch) | |
tree | 92a73191ef2cdd9443c457a1e280c9d67e16a1c9 | |
parent | 67390097ab8e7d6fe9289418f288374663b0c6c5 (diff) |
Fix warnings(?) for implicit type conversions + headers in quick.h.
Fixes #43, #44.
-rw-r--r-- | entityx/Entity.h | 2 | ||||
-rw-r--r-- | entityx/Event.h | 2 | ||||
-rw-r--r-- | entityx/quick.h | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/entityx/Entity.h b/entityx/Entity.h index cf6a506..e36d761 100644 --- a/entityx/Entity.h +++ b/entityx/Entity.h @@ -501,7 +501,7 @@ class EntityManager : entityx::help::NonCopyable { template <typename C, typename ... Args> ComponentHandle<C> assign(Entity::Id id, Args && ... args) { assert_valid(id); - const int family = C::family(); + const BaseComponent::Family family = C::family(); // Placement new into the component pool. Pool<C> *pool = accomodate_component<C>(); new(pool->get(id.index())) C(std::forward<Args>(args) ...); diff --git a/entityx/Event.h b/entityx/Event.h index e7d7def..f830be0 100644 --- a/entityx/Event.h +++ b/entityx/Event.h @@ -159,7 +159,7 @@ class EventManager : entityx::help::NonCopyable { template <typename E, typename ... Args> void emit(Args && ... args) { E event(std::forward<Args>(args) ...); - auto sig = signal_for(E::family()); + auto sig = signal_for(size_t(E::family())); BaseEvent *base = &event; sig->emit(base); } diff --git a/entityx/quick.h b/entityx/quick.h index 9a668eb..3454b58 100644 --- a/entityx/quick.h +++ b/entityx/quick.h @@ -10,6 +10,9 @@ #pragma once +#include "entityx/Entity.h" +#include "entityx/Event.h" +#include "entityx/System.h" #include "entityx/config.h" namespace entityx { |