From 2417abe35038e903bf63d996ae6252173aa878a2 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sat, 7 Sep 2019 01:24:15 -0400 Subject: Removed EntityX pointers from script system and replaced with references --- src/script.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/script.cpp') diff --git a/src/script.cpp b/src/script.cpp index e1dea6a..a6f0968 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -24,12 +24,9 @@ * SYSTEM SPECIFIC * *********************/ -void ScriptSystem::configure(entityx::EntityManager& entities, - entityx::EventManager& events) +void ScriptSystem::configure([[maybe_unused]] entityx::EntityManager& entities, + [[maybe_unused]] entityx::EventManager& events) { - this->manager = &entities; - this->events = &events; - events.subscribe(*this); // Init after systems.configure() in engine.cpp @@ -137,7 +134,7 @@ sol::table ScriptSystem::spawn(sol::object param) if (param.get_type() == sol::type::table) { sol::table tab = param; // Cast the generic parameter to a table - entityx::Entity e = manager->create(); // Create a new entity + entityx::Entity e = manager.create(); // Create a new entity auto d = e.assign().get(); // Since this entity was created // via Lua, assign the Scripted // component. -- cgit v1.2.3