diff options
author | bunnei <bunneidev@gmail.com> | 2020-12-29 07:24:05 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-01-11 23:23:16 +0100 |
commit | 92d5c63f0172aa222dca0dbca3aefb4e7b4bec06 (patch) | |
tree | 15a25b15493f098c0b96873105ac6a547ca0c8f7 /src | |
parent | hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged. (diff) | |
download | yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar.gz yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar.bz2 yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar.lz yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar.xz yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.tar.zst yuzu-92d5c63f0172aa222dca0dbca3aefb4e7b4bec06.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/common/common_funcs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 367b6bf6e..c90978f9c 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -93,6 +93,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void); return static_cast<T>(key) == 0; \ } +/// Evaluates a boolean expression, and returns a result unless that expression is true. +#define R_UNLESS(expr, res) \ + { \ + if (!(expr)) { \ + return res; \ + } \ + } + namespace Common { [[nodiscard]] constexpr u32 MakeMagic(char a, char b, char c, char d) { |