core: remove ResultVal type

This commit is contained in:
Liam
2023-07-14 20:16:39 -04:00
parent 85e3575496
commit 84cb20bc72
32 changed files with 374 additions and 483 deletions

View File

@ -102,16 +102,17 @@ Result ServerManager::RegisterNamedService(const std::string& service_name,
m_system.ServiceManager().RegisterService(service_name, max_sessions, handler)));
// Get the registered port.
auto port = m_system.ServiceManager().GetServicePort(service_name);
ASSERT(port.Succeeded());
Kernel::KPort* port{};
ASSERT(
R_SUCCEEDED(m_system.ServiceManager().GetServicePort(std::addressof(port), service_name)));
// Open a new reference to the server port.
(*port)->GetServerPort().Open();
port->GetServerPort().Open();
// Begin tracking the server port.
{
std::scoped_lock ll{m_list_mutex};
m_ports.emplace(std::addressof((*port)->GetServerPort()), std::move(handler));
m_ports.emplace(std::addressof(port->GetServerPort()), std::move(handler));
}
// Signal the wakeup event.