From: Nodmgatall Date: Sat, 13 Jun 2015 19:51:38 +0000 (+0200) Subject: Make Receiver inheritance public instead of implicitly private X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=2e5e01d6d5e9f7c74ed7449e843736e08077b092;p=clyne%2Fentityx.git Make Receiver inheritance public instead of implicitly private Otherwise you get an error when trying to run the example. /home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/entityx/entityx/Event.h: In instantiation of ‘void entityx::EventManager::subscribe(Receiver&) [with E = PlayerInstrucionEvent; Receiver = MovementSystem]’: /home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/src/system_movement.hpp:17:58: required from here /home/lemling/Dokumente/Proggen/BaconGameJam/bgj09/entityx/entityx/Event.h:130:26: error: ‘entityx::BaseReceiver’ is an inaccessible base of ‘MovementSystem’ BaseReceiver &base = receiver; --- diff --git a/README.md b/README.md index 2439e04..11a01fb 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ class CollisionSystem : public System { Objects interested in receiving collision information can subscribe to ``Collision`` events by first subclassing the CRTP class ``Receiver``: ```c++ -struct DebugSystem : public System, Receiver { +struct DebugSystem : public System, public Receiver { void configure(entityx::EventManager &event_manager) { event_manager.subscribe(*this); }