mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-14 03:00:00 +00:00
common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log.
This commit is contained in:
parent
3f942c01f0
commit
4577dcd5f9
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue