1
0
Fork 0

SGSubsystemMgr: Switch to the new add() function with a single subsystem object argument.

This allows for the static class ID, GroupType, and update interval to be automatically extracted
from the subsystem registration information.
This commit is contained in:
Edward d'Auvergne 2022-11-29 16:36:05 +01:00
parent 12ca368868
commit 30d63b7209

View file

@ -1035,7 +1035,7 @@ void fgCreateSubsystems(bool duringReset) {
{
SGSubsystem * httpd = flightgear::http::FGHttpd::createInstance( fgGetNode(flightgear::http::PROPERTY_ROOT) );
if( NULL != httpd )
mgr->add("httpd", httpd);
mgr->add(httpd);
}
if (!duringReset) {
@ -1106,7 +1106,7 @@ void fgCreateSubsystems(bool duringReset) {
mgr->add<CanvasMgr>();
auto canvasGui = new GUIMgr;
mgr->add("CanvasGUI", canvasGui, SGSubsystemMgr::DISPLAY);
mgr->add(canvasGui);
auto guiCamera = flightgear::getGUICamera(flightgear::CameraGroup::getDefault());
canvasGui->setGUIViewAndCamera(globals->get_renderer()->getView(), guiCamera);
@ -1117,7 +1117,7 @@ void fgCreateSubsystems(bool duringReset) {
// ordering here is important : Nasal (via events), then models, then views
if (!duringReset) {
mgr->add<FGLight>();
mgr->add("events", globals->get_event_mgr(), SGSubsystemMgr::DISPLAY);
mgr->add(globals->get_event_mgr());
}
mgr->add<FGAircraftModel>();