Codechange: Suppress warnings when asserts are disabled (#8917)

This commit is contained in:
Patric Stout
2021-04-01 11:16:19 +02:00
committed by GitHub
parent 9eb6c78a02
commit fece1c57ca
14 changed files with 31 additions and 7 deletions

View File

@@ -658,7 +658,9 @@ static void HeightMapCurves(uint level)
for (uint t = 0; t < lengthof(curve_maps); t++) {
if (!HasBit(corner_bits, t)) continue;
#ifndef NDEBUG
bool found = false;
#endif
const control_point_t *cm = curve_maps[t].list;
for (uint i = 0; i < curve_maps[t].length - 1; i++) {
const control_point_t &p1 = cm[i];
@@ -666,7 +668,9 @@ 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
found = true;
#endif
break;
}
}