]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Fix warnings(?) for implicit type conversions + headers in quick.h.
authorAlec Thomas <alec@swapoff.org>
Wed, 30 Jul 2014 23:36:34 +0000 (09:36 +1000)
committerAlec Thomas <alec@swapoff.org>
Wed, 30 Jul 2014 23:37:51 +0000 (09:37 +1000)
Fixes #43, #44.

entityx/Entity.h
entityx/Event.h
entityx/quick.h

index cf6a506bdc898c8354a8aa7ea87d6aef8141c73c..e36d7612eef24924f7d10aa1cad4e3eb4a98f622 100644 (file)
@@ -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) ...);
index e7d7defa8d2202522000e93318f5476456cebd73..f830be0414a751bab0f58ded30d4b1897a67ec5d 100644 (file)
@@ -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);
   }
index 9a668eb84c176b3c6a5f009abcf3e3cf4fd4793a..3454b589a80607c936729c2e6567dc8941400642 100644 (file)
@@ -10,6 +10,9 @@
 
 #pragma once
 
+#include "entityx/Entity.h"
+#include "entityx/Event.h"
+#include "entityx/System.h"
 #include "entityx/config.h"
 
 namespace entityx {