From d8625f5544dd0caba80d9ba0be51d0ba96414ae2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Dec 2018 01:33:19 -0500 Subject: hle/service, hle/sm: Compress usages of MakeResult() These auto-deduce the result based off its arguments, so there's no need to do that work for the compiler, plus, the function return value itself already indicates what we're returning. --- src/core/hle/service/service.cpp | 2 +- src/core/hle/service/sm/sm.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 7de2c5a40..0ca234d50 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -122,7 +122,7 @@ Kernel::SharedPtr ServiceFrameworkBase::CreatePort() { auto& kernel = Core::System::GetInstance().Kernel(); auto [server_port, client_port] = Kernel::ServerPort::CreatePortPair(kernel, max_sessions, service_name); - port = MakeResult>(std::move(server_port)).Unwrap(); + port = MakeResult(std::move(server_port)).Unwrap(); port->SetHleHandler(shared_from_this()); return client_port; } diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index d0e35b4d6..d73530086 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -58,7 +58,7 @@ ResultVal> ServiceManager::RegisterService Kernel::ServerPort::CreatePortPair(kernel, max_sessions, name); registered_services.emplace(std::move(name), std::move(client_port)); - return MakeResult>(std::move(server_port)); + return MakeResult(std::move(server_port)); } ResultCode ServiceManager::UnregisterService(const std::string& name) { @@ -81,7 +81,7 @@ ResultVal> ServiceManager::GetServicePort( return ERR_SERVICE_NOT_REGISTERED; } - return MakeResult>(it->second); + return MakeResult(it->second); } ResultVal> ServiceManager::ConnectToService( -- cgit v1.2.3