summaryrefslogtreecommitdiff
path: root/src/townname.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-03 16:55:08 +0200
committerPatric Stout <github@truebrain.nl>2021-06-03 17:30:00 +0200
commit28e90769f74e55ea7c8f75146d5b33e0aa777da8 (patch)
treeeeff0974346ef9da7cbc2b33b040d016c341ff0b /src/townname.cpp
parentf8dd5dd00a7aa3cc5769b4bce0a1b7a63073c8ce (diff)
downloadopenttd-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/townname.cpp')
-rw-r--r--src/townname.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/townname.cpp b/src/townname.cpp
index 519391f14..bce894bfc 100644
--- a/src/townname.cpp
+++ b/src/townname.cpp
@@ -600,9 +600,7 @@ static char *MakeCzechTownName(char *buf, const char *last, uint32 seed)
return strecpy(buf, _name_czech_real[SeedModChance(4, lengthof(_name_czech_real), seed)], last);
}
-#ifdef WITH_ASSERT
- const char *orig = buf;
-#endif
+ [[maybe_unused]] const char *orig = buf;
/* Probability of prefixes/suffixes
* 0..11 prefix, 12..13 prefix+suffix, 14..17 suffix, 18..31 nothing */