mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-17 00:57:56 +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:
parent
79a983cc95
commit
4d55e58ee4
58 changed files with 421 additions and 226 deletions
|
@ -224,12 +224,12 @@ bool DmntCheatVm::DecodeNextOpcode(CheatVmOpcode& out) {
|
|||
// If we've ever seen a decode failure, return false.
|
||||
bool valid = decode_success;
|
||||
CheatVmOpcode opcode = {};
|
||||
SCOPE_EXIT({
|
||||
SCOPE_EXIT {
|
||||
decode_success &= valid;
|
||||
if (valid) {
|
||||
out = opcode;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Helper function for getting instruction dwords.
|
||||
const auto GetNextDword = [&] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue