mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
ENSURES usage removed
This commit is contained in:
parent
b0f5796c90
commit
1f3433464c
9 changed files with 17 additions and 24 deletions
|
@ -58,14 +58,12 @@
|
|||
|
||||
#define HERE "\n(in file " __FILE__ ":" STRINGIZE(__LINE__) ")"
|
||||
|
||||
// Wrap an expression into lambda
|
||||
// Wrap an expression into lambda. Obsolete.
|
||||
#define WRAP_EXPR(...) [&] { return __VA_ARGS__; }
|
||||
|
||||
// Ensure that the expression is evaluated to true. Always evaluated and allowed to have side effects (unlike assert() macro).
|
||||
// Ensure that the expression is evaluated to true. Obsolete.
|
||||
#define VERIFY(...) do { if (!(__VA_ARGS__)) fmt::raw_error("Verification failed: " #__VA_ARGS__ HERE); } while (0)
|
||||
|
||||
// EXPECTS() and ENSURES() are intended to check function arguments and results.
|
||||
// Expressions are not guaranteed to evaluate.
|
||||
#define EXPECTS(...) do { if (!(__VA_ARGS__)) fmt::raw_error("Precondition failed: " #__VA_ARGS__ HERE); } while (0)
|
||||
#define ENSURES(...) do { if (!(__VA_ARGS__)) fmt::raw_error("Postcondition failed: " #__VA_ARGS__ HERE); } while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue