From fd4ca1c811212c361128b5d1857a15c11a0f9ecb Mon Sep 17 00:00:00 2001 From: Edward d'Auvergne Date: Fri, 4 May 2018 09:02:08 +0200 Subject: [PATCH] Revert "Speculative fix for global symbol issues for Edward" This reverts commit b6f5b4055769abaf851f05c393247ff33fe84ce1. The changes did not solve the static init vector allocation issue. --- simgear/structure/subsystem_mgr.cxx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 9bfe1b9b..c5ae8cad 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -668,9 +668,9 @@ SGSubsystemGroup::Member::update (double delta_time_sec) namespace { SGSubsystemMgr* global_defaultSubsystemManager = nullptr; - + void registerSubsystemCommands(); - + } // end of anonymous namespace SGSubsystemMgr::SGSubsystemMgr () : @@ -912,19 +912,19 @@ namespace { }; using SybsystemRegistrationVec = std::vector; + + SybsystemRegistrationVec global_registrations; + + SybsystemRegistrationVec::const_iterator findRegistration(const std::string& name) + { + auto it = std::find_if(global_registrations.begin(), + global_registrations.end(), + [name](const RegisteredSubsystemData& d) + { return name == d.name; }); + return it; + } } // of anonymous namespace -static SybsystemRegistrationVec global_registrations; - -SybsystemRegistrationVec::const_iterator findRegistration(const std::string& name) -{ - auto it = std::find_if(global_registrations.begin(), - global_registrations.end(), - [name](const RegisteredSubsystemData& d) - { return name == d.name; }); - return it; -} - void SGSubsystemMgr::registerSubsystem(const std::string& name, SubsystemFactoryFunctor f, GroupType group,