(svn r27328) -Codechange: Add an assertion to check for uninitialised variables when tracing variety distribution's control curves.

pull/155/head
frosch 9 years ago
parent d25934580f
commit fc902d354f

@ -667,6 +667,7 @@ static void HeightMapCurves(uint level)
for (uint t = 0; t < lengthof(curve_maps); t++) {
if (!HasBit(corner_bits, t)) continue;
bool found = false;
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];
@ -674,9 +675,11 @@ 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);
found = true;
break;
}
}
assert(found);
}
/* Apply interpolation of curve map results. */

Loading…
Cancel
Save