mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-25 08:57:04 +02: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:
parent
79a983cc95
commit
4d55e58ee4
58 changed files with 421 additions and 226 deletions
|
|
@ -24,11 +24,11 @@ void AppletStorageChannel::Push(std::shared_ptr<IStorage> storage) {
|
|||
Result AppletStorageChannel::Pop(std::shared_ptr<IStorage>* out_storage) {
|
||||
std::scoped_lock lk{m_lock};
|
||||
|
||||
SCOPE_EXIT({
|
||||
SCOPE_EXIT {
|
||||
if (m_data.empty()) {
|
||||
m_event.Clear();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
R_UNLESS(!m_data.empty(), AM::ResultNoDataInChannel);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,9 @@ bool Process::Initialize(u64 program_id, u8 minimum_key_generation, u8 maximum_k
|
|||
Kernel::KProcess::Register(m_system.Kernel(), process);
|
||||
|
||||
// On exit, ensure we free the additional reference to the process.
|
||||
SCOPE_EXIT({ process->Close(); });
|
||||
SCOPE_EXIT {
|
||||
process->Close();
|
||||
};
|
||||
|
||||
// Insert process modules into memory.
|
||||
const auto [load_result, load_parameters] = app_loader->Load(*process, m_system);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue