early-access version 1410

This commit is contained in:
pineappleEA
2021-02-04 00:41:27 +01:00
parent baa567a60d
commit 7023d1239c
61 changed files with 729 additions and 360 deletions

View File

@@ -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.

View File

@@ -31,6 +31,8 @@ ScopeExitHelper<Func> ScopeExit(Func&& func) {
}
} // namespace detail
#define SCOPE_GUARD(body) detail::ScopeExit([&]() body)
/**
* This macro allows you to conveniently specify a block of code that will run on scope exit. Handy
* for doing ad-hoc clean-up tasks in a function with multiple returns.