Changes for SimGear subsystem add/remove tracking
Since the subsystem manager tracks group state, it now binds/inits automatically. This means groups which create subsystems during init no longer need to manually bind() them.
This commit is contained in:
parent
f5117109fe
commit
26bc3713b5
4 changed files with 0 additions and 14 deletions
|
@ -42,7 +42,6 @@ private:
|
|||
SGSharedPtr<const SGCondition> _condition;
|
||||
SGPropertyNode_ptr _enable_prop;
|
||||
std::string * _enable_value;
|
||||
std::string _name;
|
||||
bool _enabled;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -78,11 +78,6 @@ void CockpitDisplayManager::init()
|
|||
SG_LOG(SG_COCKPIT, SG_ALERT, "Failed to load instrumentation system model: "
|
||||
<< config << ":" << e.getFormattedMessage() );
|
||||
}
|
||||
|
||||
// bind() created instruments before init.
|
||||
BOOST_FOREACH(std::string s, _displays) {
|
||||
get_subsystem(s)->bind();
|
||||
}
|
||||
|
||||
SGSubsystemGroup::init();
|
||||
}
|
||||
|
|
|
@ -367,7 +367,6 @@ void TerrainSamplerImplementation::init()
|
|||
|
||||
void TerrainSamplerImplementation::postinit()
|
||||
{
|
||||
SGSubsystemGroup::bind();//
|
||||
}
|
||||
|
||||
void TerrainSamplerImplementation::reinit()
|
||||
|
|
|
@ -97,13 +97,6 @@ void FGInstrumentMgr::init()
|
|||
set_subsystem("gps[0]", new GPS(nd, true /* default GPS mode */));
|
||||
}
|
||||
|
||||
// bind() created instruments before init.
|
||||
for (unsigned int i=0; i<_instruments.size(); ++i) {
|
||||
const std::string& nm(_instruments[i]);
|
||||
SGSubsystem* instr = get_subsystem(nm);
|
||||
instr->bind();
|
||||
}
|
||||
|
||||
SGSubsystemGroup::init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue