hle/service, hle/sm: Use structured bindings where applicable

Gets rid of the need to keep the variables separate from their actual
initialization spots.
This commit is contained in:
Lioncash 2018-12-06 01:33:19 -05:00 committed by fearlessTobi
parent 0cb7654d60
commit a32725540c

View file

@ -43,7 +43,7 @@ ResultVal<Kernel::SharedPtr<Kernel::ServerPort>> ServiceManager::RegisterService
auto [server_port, client_port] = system.Kernel().CreatePortPair(max_sessions, name); auto [server_port, client_port] = system.Kernel().CreatePortPair(max_sessions, name);
registered_services.emplace(std::move(name), std::move(client_port)); registered_services.emplace(std::move(name), std::move(client_port));
return MakeResult<Kernel::SharedPtr<Kernel::ServerPort>>(std::move(server_port)); return MakeResult(std::move(server_port));
} }
ResultVal<Kernel::SharedPtr<Kernel::ClientPort>> ServiceManager::GetServicePort( ResultVal<Kernel::SharedPtr<Kernel::ClientPort>> ServiceManager::GetServicePort(
@ -55,7 +55,7 @@ ResultVal<Kernel::SharedPtr<Kernel::ClientPort>> ServiceManager::GetServicePort(
return ERR_SERVICE_NOT_REGISTERED; return ERR_SERVICE_NOT_REGISTERED;
} }
return MakeResult<Kernel::SharedPtr<Kernel::ClientPort>>(it->second); return MakeResult(it->second);
} }
ResultVal<Kernel::SharedPtr<Kernel::ClientSession>> ServiceManager::ConnectToService( ResultVal<Kernel::SharedPtr<Kernel::ClientSession>> ServiceManager::ConnectToService(