]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Fix VS2013 compiler error in Entity_test.cc
authorIsraël Hallé <israel.halle@shopify.com>
Thu, 10 Jul 2014 03:09:24 +0000 (23:09 -0400)
committerIsraël Hallé <israel.halle@shopify.com>
Thu, 10 Jul 2014 03:09:24 +0000 (23:09 -0400)
entityx/Entity_test.cc [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 1c47453..ee1ccac
@@ -337,6 +337,10 @@ TEST_CASE_METHOD(EntityManagerFixture, "TestEntityDestroyedEvent") {
 TEST_CASE_METHOD(EntityManagerFixture, "TestComponentAddedEvent") {
   struct ComponentAddedEventReceiver
       : public Receiver<ComponentAddedEventReceiver> {
+
+    ComponentAddedEventReceiver()
+      : position_events(0), direction_events(0) {}
+
     void receive(const ComponentAddedEvent<Position> &event) {
       auto p = event.component;
       float n = static_cast<float>(position_events);
@@ -353,8 +357,8 @@ TEST_CASE_METHOD(EntityManagerFixture, "TestComponentAddedEvent") {
       direction_events++;
     }
 
-    int position_events = 0;
-    int direction_events = 0;
+    int position_events;
+    int direction_events;
   };
 
   ComponentAddedEventReceiver receiver;