mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-08 03:35:35 +08:00
refactor: Simplify calls by not chaining
This commit is contained in:
@@ -24,9 +24,13 @@ namespace swift::core::context
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case CCoreFacadeConfig::Local:
|
||||
case CCoreFacadeConfig::Local: return new CContextOwnAircraft(mode, parent);
|
||||
case CCoreFacadeConfig::LocalInDBusServer:
|
||||
return (new CContextOwnAircraft(mode, parent))->registerWithDBus(server);
|
||||
{
|
||||
auto *context = new CContextOwnAircraft(mode, parent);
|
||||
context->registerWithDBus(server);
|
||||
return context;
|
||||
}
|
||||
case CCoreFacadeConfig::Remote:
|
||||
return new CContextOwnAircraftProxy(CDBusServer::coreServiceName(connection), connection, mode, parent);
|
||||
case CCoreFacadeConfig::NotUsed:
|
||||
|
||||
Reference in New Issue
Block a user