summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-31 09:51:16 +0100
committerbunnei <bunneidev@gmail.com>2021-02-05 23:00:36 +0100
commit4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf (patch)
treef32d55fc1d82d0e2ecfa23db8e84ff69d0934adb /src
parenthle: kernel: Rename WritableEvent to KWritableEvent. (diff)
downloadyuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar.gz
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar.bz2
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar.lz
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar.xz
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.tar.zst
yuzu-4577dcd5f90ae4e4e19a5ebdcec0f6f847977edf.zip
Diffstat (limited to '')
-rw-r--r--src/common/common_funcs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 71b64e32a..cd3207a03 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -104,6 +104,14 @@ __declspec(dllimport) void __stdcall DebugBreak(void);
} \
}
+/// Evaluates a boolean expression, and returns a result unless that expression is true.
+#define R_UNLESS_NOLOG(expr, res) \
+ { \
+ if (!(expr)) { \
+ return res; \
+ } \
+ }
+
#define R_SUCCEEDED(res) (res.IsSuccess())
/// Evaluates an expression that returns a result, and returns the result if it would fail.