From 310c1f50beb77fc5c6f9075029973161d4e51a4a Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Mon, 19 Feb 2024 16:00:46 +0100 Subject: scope_exit: Make constexpr Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it. --- src/core/hle/kernel/svc/svc_port.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/svc/svc_port.cpp') diff --git a/src/core/hle/kernel/svc/svc_port.cpp b/src/core/hle/kernel/svc/svc_port.cpp index 737749f7d..9a22dadaf 100644 --- a/src/core/hle/kernel/svc/svc_port.cpp +++ b/src/core/hle/kernel/svc/svc_port.cpp @@ -68,10 +68,10 @@ Result CreatePort(Core::System& system, Handle* out_server, Handle* out_client, port->Initialize(max_sessions, is_light, name); // Ensure that we clean up the port (and its only references are handle table) on function end. - SCOPE_EXIT({ + SCOPE_EXIT { port->GetServerPort().Close(); port->GetClientPort().Close(); - }); + }; // Register the port. KPort::Register(kernel, port); @@ -150,10 +150,10 @@ Result ManageNamedPort(Core::System& system, Handle* out_server_handle, uint64_t KPort::Register(system.Kernel(), port); // Ensure that our only reference to the port is in the handle table when we're done. - SCOPE_EXIT({ + SCOPE_EXIT { port->GetClientPort().Close(); port->GetServerPort().Close(); - }); + }; // Register the handle in the table. R_TRY(handle_table.Add(out_server_handle, std::addressof(port->GetServerPort()))); -- cgit v1.2.3