forked from fmtlib/fmt
Cleanup FMT_ASSERT
This commit is contained in:
@ -371,8 +371,9 @@ template <typename T> constexpr auto const_check(T value) -> T { return value; }
|
||||
FMT_NORETURN FMT_API void assert_fail(const char* file, int line,
|
||||
const char* message);
|
||||
|
||||
#ifndef FMT_ASSERT
|
||||
# ifdef NDEBUG
|
||||
#if defined(FMT_ASSERT)
|
||||
// Use the provided definition.
|
||||
#elif defined(NDEBUG)
|
||||
// FMT_ASSERT is not empty to avoid -Wempty-body.
|
||||
# define FMT_ASSERT(condition, message) \
|
||||
fmt::detail::ignore_unused((condition), (message))
|
||||
@ -382,7 +383,6 @@ FMT_NORETURN FMT_API void assert_fail(const char* file, int line,
|
||||
? (void)0 \
|
||||
: fmt::detail::assert_fail(__FILE__, __LINE__, (message)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef FMT_USE_INT128
|
||||
// Do nothing.
|
||||
|
Reference in New Issue
Block a user