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