mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2026-06-24 20:55:52 +00:00
ams: add R_UNLESS_LOG()
This commit is contained in:
parent
38251801df
commit
fbeea26919
@ -494,6 +494,14 @@ namespace ams::result::impl {
|
||||
} \
|
||||
}
|
||||
|
||||
#define R_UNLESS_LOG(expr, res, ...) \
|
||||
{ \
|
||||
if (!(expr)) { \
|
||||
AMS_LOG(__VA_ARGS__); \
|
||||
R_THROW(res); \
|
||||
} \
|
||||
}
|
||||
|
||||
/// Evaluates a boolean expression, and succeeds if that expression is true.
|
||||
#define R_SUCCEED_IF(expr) R_UNLESS(!(expr), ResultSuccess())
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user