mirror of
https://git.suyu.dev/suyu/suyu
synced 2026-05-29 23:39:12 +00:00
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:
@@ -92,11 +92,11 @@ NvResult nvhost_ctrl::IocCtrlEventWait(IocCtrlEventWaitParams& params, bool is_a
|
||||
|
||||
bool must_unmark_fail = !is_allocation;
|
||||
const u32 event_id = params.value.raw;
|
||||
SCOPE_EXIT({
|
||||
SCOPE_EXIT {
|
||||
if (must_unmark_fail) {
|
||||
events[event_id].fails = 0;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const u32 fence_id = static_cast<u32>(params.fence.id);
|
||||
|
||||
|
||||
@@ -154,10 +154,10 @@ void NVDRV::Close(HLERequestContext& ctx) {
|
||||
void NVDRV::Initialize(HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
SCOPE_EXIT({
|
||||
SCOPE_EXIT {
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushEnum(NvResult::Success);
|
||||
});
|
||||
};
|
||||
|
||||
if (is_initialized) {
|
||||
// No need to initialize again
|
||||
|
||||
Reference in New Issue
Block a user