summaryrefslogtreecommitdiff
path: root/src/tgp.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-04-01 23:57:49 +0100
committerGitHub <noreply@github.com>2021-04-01 23:57:49 +0100
commitdd798d688b7e9ea6c7d4d01aea976dde5ec75f60 (patch)
tree35dbd6e5a3c3288d098cd961315bc57ae79ce524 /src/tgp.cpp
parent2a9825b8dec9d5bb3f43e36fcaae735f505e81de (diff)
downloadopenttd-dd798d688b7e9ea6c7d4d01aea976dde5ec75f60.tar.xz
Fix #8919: Release builds with asserts enabled (#8925)
Diffstat (limited to 'src/tgp.cpp')
-rw-r--r--src/tgp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp
index 39fda6e6b..e23b2643d 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -658,7 +658,7 @@ static void HeightMapCurves(uint level)
for (uint t = 0; t < lengthof(curve_maps); t++) {
if (!HasBit(corner_bits, t)) continue;
-#ifndef NDEBUG
+#ifdef WITH_ASSERT
bool found = false;
#endif
const control_point_t *cm = curve_maps[t].list;
@@ -668,7 +668,7 @@ static void HeightMapCurves(uint level)
if (*h >= p1.x && *h < p2.x) {
ht[t] = p1.y + (*h - p1.x) * (p2.y - p1.y) / (p2.x - p1.x);
-#ifndef NDEBUG
+#ifdef WITH_ASSERT
found = true;
#endif
break;