diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-20 16:11:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 16:11:30 -0800 |
commit | 1d0604e33cfbed304db269b089e4dcb5569e926c (patch) | |
tree | ebaa8993e07ab003dc74d56941903cec4b38cdf9 /src | |
parent | 58d82243f793f6b1ba37cf3175ecc71febb30061 (diff) | |
parent | 9dcc229dfeee5061b69bce200d3256ed8fa9304e (diff) |
Merge pull request #1748 from lioncash/assert
common/assert: Make the UNIMPLEMENTED macro properly assert
Diffstat (limited to 'src')
-rw-r--r-- | src/common/assert.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/assert.h b/src/common/assert.h index 0d4eddc19..6002f7ab1 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -52,5 +52,8 @@ __declspec(noinline, noreturn) #define DEBUG_ASSERT_MSG(_a_, _desc_, ...) #endif -#define UNIMPLEMENTED() LOG_CRITICAL(Debug, "Unimplemented code!") +#define UNIMPLEMENTED() ASSERT_MSG(false, "Unimplemented code!") #define UNIMPLEMENTED_MSG(...) ASSERT_MSG(false, __VA_ARGS__) + +#define UNIMPLEMENTED_IF(cond) ASSERT_MSG(!(cond), "Unimplemented code!") +#define UNIMPLEMENTED_IF_MSG(cond, ...) ASSERT_MSG(!(cond), __VA_ARGS__) |