diff options
| author | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 16:00:46 +0100 |
|---|---|---|
| committer | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 16:00:46 +0100 |
| commit | 310c1f50beb77fc5c6f9075029973161d4e51a4a (patch) | |
| tree | 43a5699123e4930560fc5016faac7efb15b63f4e /src/core/hle/kernel/kernel.cpp | |
| parent | 665fce871fc7190f92f9912ec3ae31c891bb3227 (diff) | |
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/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 4f4b02fac..9e5eaeec4 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -109,7 +109,9 @@ struct KernelCore::Impl { void Shutdown() { is_shutting_down.store(true, std::memory_order_relaxed); - SCOPE_EXIT({ is_shutting_down.store(false, std::memory_order_relaxed); }); + SCOPE_EXIT { + is_shutting_down.store(false, std::memory_order_relaxed); + }; CloseServices(); @@ -1080,7 +1082,9 @@ std::jthread KernelCore::RunOnHostCoreProcess(std::string&& process_name, process->Initialize(Svc::CreateProcessParameter{}, GetSystemResourceLimit(), false))); // Ensure that we don't hold onto any extra references. - SCOPE_EXIT({ process->Close(); }); + SCOPE_EXIT { + process->Close(); + }; // Register the new process. KProcess::Register(*this, process); @@ -1108,7 +1112,9 @@ void KernelCore::RunOnGuestCoreProcess(std::string&& process_name, std::function process->Initialize(Svc::CreateProcessParameter{}, GetSystemResourceLimit(), false))); // Ensure that we don't hold onto any extra references. - SCOPE_EXIT({ process->Close(); }); + SCOPE_EXIT { + process->Close(); + }; // Register the new process. KProcess::Register(*this, process); |
