forked from mirror/OpenTTD
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this is always set if assert() is valid. No matter if NDEBUG is set or not.
This commit is contained in:
committed by
Patric Stout
parent
f8dd5dd00a
commit
28e90769f7
@@ -435,11 +435,6 @@ void NORETURN CDECL error(const char *str, ...) WARN_FORMAT(1, 2);
|
||||
# define assert(expression) if (unlikely(!(expression))) error("Assertion failed at line %i of %s: %s", __LINE__, __FILE__, #expression);
|
||||
#endif
|
||||
|
||||
/* Asserts are enabled if NDEBUG isn't defined or WITH_ASSERT is defined. */
|
||||
#if !defined(NDEBUG) || defined(WITH_ASSERT)
|
||||
# define OTTD_ASSERT
|
||||
#endif
|
||||
|
||||
#if defined(OPENBSD)
|
||||
/* OpenBSD uses strcasecmp(3) */
|
||||
# define _stricmp strcasecmp
|
||||
|
Reference in New Issue
Block a user