scope_exit: Make constexpr

Allows the use of the macro in constexpr-contexts.
Also avoids some potential problems when nesting braces inside it.
This commit is contained in:
FearlessTobi
2024-02-19 16:00:46 +01:00
parent 665fce871f
commit 310c1f50be
58 changed files with 421 additions and 226 deletions

View File

@ -197,7 +197,9 @@ private:
MicroProfileOnThreadCreate(name.c_str());
// Cleanup
SCOPE_EXIT({ MicroProfileOnThreadExit(); });
SCOPE_EXIT {
MicroProfileOnThreadExit();
};
Common::SetCurrentThreadName(name.c_str());
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);