diff options
author | Patric Stout <truebrain@openttd.org> | 2021-06-03 16:55:08 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-06-03 17:30:00 +0200 |
commit | 28e90769f74e55ea7c8f75146d5b33e0aa777da8 (patch) | |
tree | eeff0974346ef9da7cbc2b33b040d016c341ff0b /src/stdafx.h | |
parent | f8dd5dd00a7aa3cc5769b4bce0a1b7a63073c8ce (diff) | |
download | openttd-28e90769f74e55ea7c8f75146d5b33e0aa777da8.tar.xz |
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.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r-- | src/stdafx.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index dc52fc0d5..e593344bf 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -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 |