assert: Use false in asserts rather than 0

Quiets extended warnings.
This commit is contained in:
Lioncash 2016-08-23 09:03:22 -04:00 committed by MerryMage
parent 8c7a81a308
commit 67706c208b

View file

@ -29,13 +29,13 @@ static void assert_noinline_call(const Fn& fn) {
do if (!(_a_)) { assert_noinline_call([] { \
fprintf(stderr, "Assertion Failed!\n" #_a_); \
throw ""; \
}); } while (0)
}); } while (false)
#define ASSERT_MSG(_a_, ...) \
do if (!(_a_)) { assert_noinline_call([&] { \
fprintf(stderr, "Assertion Failed!\n" #_a_ "\n" __VA_ARGS__); \
throw ""; \
}); } while (0)
}); } while (false)
#define UNREACHABLE() ASSERT_MSG(false, "Unreachable code!")
#define UNREACHABLE_MSG(...) ASSERT_MSG(false, __VA_ARGS__)