1
0
Fork 0

ATCManagers: Use modern subsystem retrieval

This commit is contained in:
James Turner 2020-08-11 18:28:51 +01:00
parent 250669f75a
commit 21629402ce

View file

@ -560,14 +560,14 @@ FGATCController::FGATCController()
FGATCController::~FGATCController()
{
FGATCManager *mgr = (FGATCManager*) globals->get_subsystem("ATC");
auto mgr = globals->get_subsystem<FGATCManager>();
mgr->removeController(this);
}
void FGATCController::init()
{
if (!initialized) {
FGATCManager *mgr = (FGATCManager*) globals->get_subsystem("ATC");
auto mgr = globals->get_subsystem<FGATCManager>();
mgr->addController(this);
initialized = true;
}