diff options
author | FearlessTobi <[email protected]> | 2024-02-19 16:00:46 +0100 |
---|---|---|
committer | FearlessTobi <[email protected]> | 2024-02-19 16:00:46 +0100 |
commit | 310c1f50beb77fc5c6f9075029973161d4e51a4a (patch) | |
tree | 43a5699123e4930560fc5016faac7efb15b63f4e /src/core/hle/service/server_manager.cpp | |
parent | 665fce871fc7190f92f9912ec3ae31c891bb3227 (diff) | |
download | yuzu-android-310c1f50beb77fc5c6f9075029973161d4e51a4a.tar.gz yuzu-android-310c1f50beb77fc5c6f9075029973161d4e51a4a.zip |
scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
Diffstat (limited to 'src/core/hle/service/server_manager.cpp')
-rw-r--r-- | src/core/hle/service/server_manager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp index 8c7f94c8c..0b41bbcb9 100644 --- a/src/core/hle/service/server_manager.cpp +++ b/src/core/hle/service/server_manager.cpp @@ -177,10 +177,10 @@ Result ServerManager::ManageNamedPort(const std::string& service_name, Kernel::KPort::Register(m_system.Kernel(), port); // Ensure that our reference to the port is closed if we fail to register it. - SCOPE_EXIT({ + SCOPE_EXIT { port->GetClientPort().Close(); port->GetServerPort().Close(); - }); + }; // Register the object name with the kernel. R_TRY(Kernel::KObjectName::NewFromName(m_system.Kernel(), std::addressof(port->GetClientPort()), @@ -237,7 +237,9 @@ void ServerManager::StartAdditionalHostThreads(const char* name, size_t num_thre } Result ServerManager::LoopProcess() { - SCOPE_EXIT({ m_stopped.Set(); }); + SCOPE_EXIT { + m_stopped.Set(); + }; R_RETURN(this->LoopProcessImpl()); } |