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/android/app/src/main/jni/native.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/android') diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 50cef5d2a..4ea82e217 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -404,7 +404,9 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath, const size_t program_index, const bool frontend_initiated) { MicroProfileOnThreadCreate("EmuThread"); - SCOPE_EXIT({ MicroProfileShutdown(); }); + SCOPE_EXIT { + MicroProfileShutdown(); + }; LOG_INFO(Frontend, "starting"); @@ -413,7 +415,9 @@ static Core::SystemResultStatus RunEmulation(const std::string& filepath, return Core::SystemResultStatus::ErrorLoader; } - SCOPE_EXIT({ EmulationSession::GetInstance().ShutdownEmulation(); }); + SCOPE_EXIT { + EmulationSession::GetInstance().ShutdownEmulation(); + }; jconst result = EmulationSession::GetInstance().InitializeEmulation(filepath, program_index, frontend_initiated); -- cgit v1.2.3