diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 6efcb2ad..6ceff02e 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -233,12 +233,11 @@ public: -SGSubsystemGroup::SGSubsystemGroup(const char *name) : +SGSubsystemGroup::SGSubsystemGroup() : _fixedUpdateTime(-1.0), _updateTimeRemainder(0.0), _initPosition(-1) { - _name = name; } SGSubsystemGroup::~SGSubsystemGroup () @@ -838,7 +837,7 @@ namespace { } // end of anonymous namespace -SGSubsystemMgr::SGSubsystemMgr (const char *name) : +SGSubsystemMgr::SGSubsystemMgr () : _groups(MAX_GROUPS) { if (global_defaultSubsystemManager == nullptr) { @@ -855,7 +854,7 @@ SGSubsystemMgr::SGSubsystemMgr (const char *name) : #endif for (int i = 0; i < MAX_GROUPS; i++) { - auto g = new SGSubsystemGroup(name); + auto g = new SGSubsystemGroup(); g->set_manager(this); _groups[i].reset(g); } diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index fc52ded9..af91dd4d 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -384,7 +384,7 @@ typedef SGSharedPtr SGSubsystemRef; class SGSubsystemGroup : public SGSubsystem { public: - SGSubsystemGroup (const char *name); + SGSubsystemGroup (); virtual ~SGSubsystemGroup (); // Subsystem API. @@ -509,7 +509,7 @@ public: MAX_GROUPS }; - SGSubsystemMgr (const char *name); + SGSubsystemMgr (); virtual ~SGSubsystemMgr (); // Subsystem API. diff --git a/simgear/structure/subsystem_test.cxx b/simgear/structure/subsystem_test.cxx index c75149ee..266b7fdd 100644 --- a/simgear/structure/subsystem_test.cxx +++ b/simgear/structure/subsystem_test.cxx @@ -89,7 +89,6 @@ public: class InstrumentGroup : public SGSubsystemGroup { public: - InstrumentGroup() : SGSubsystemGroup(InstrumentGroup::staticSubsystemClassId()) {} static const char* staticSubsystemClassId() { return "instruments"; } virtual ~InstrumentGroup() @@ -165,7 +164,7 @@ SGSubsystemMgr::InstancedRegistrant registrant3(SGSubsystemMgr::PO void testRegistrationAndCreation() { - SGSharedPtr manager = new SGSubsystemMgr("TEST1"); + SGSharedPtr manager = new SGSubsystemMgr(); auto anotherSub = manager->create(); SG_VERIFY(anotherSub); @@ -182,7 +181,7 @@ void testRegistrationAndCreation() void testAddGetRemove() { - SGSharedPtr manager = new SGSubsystemMgr("TEST1"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d); @@ -229,7 +228,7 @@ void testAddGetRemove() void testSubGrouping() { - SGSharedPtr manager = new SGSubsystemMgr("TEST1"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d); @@ -300,7 +299,7 @@ void testSubGrouping() void testIncrementalInit() { - SGSharedPtr manager = new SGSubsystemMgr("TEST"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d); @@ -348,7 +347,7 @@ void testEmptyGroup() // https://sourceforge.net/p/flightgear/codetickets/2043/ // when an empty group is inited, we skipped setting the state - SGSharedPtr manager = new SGSubsystemMgr("TEST"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d); @@ -372,7 +371,7 @@ void testEmptyGroup() void testSuspendResume() { - SGSharedPtr manager = new SGSubsystemMgr("TEST"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d); @@ -442,7 +441,7 @@ void testSuspendResume() void testPropertyRoot() { - SGSharedPtr manager = new SGSubsystemMgr("TEST"); + SGSharedPtr manager = new SGSubsystemMgr(); SGPropertyNode_ptr props(new SGPropertyNode); manager->set_root_node(props); @@ -468,7 +467,7 @@ void testPropertyRoot() void testAddRemoveAfterInit() { - SGSharedPtr manager = new SGSubsystemMgr("TEST"); + SGSharedPtr manager = new SGSubsystemMgr(); auto d = new RecorderDelegate; manager->addDelegate(d);