Fixed dangling else warnings.

pull/269/head
Tommy Nguyen 2016-03-26 09:16:28 +01:00
parent 8aa9afb30e
commit 14b2d51069
1 changed files with 6 additions and 5 deletions

View File

@ -1880,16 +1880,17 @@ static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edg
y1 = e->ey;
}
if (x0 == x)
if (x0 == x) {
STBTT_assert(x1 <= x+1);
else if (x0 == x+1)
} else if (x0 == x+1) {
STBTT_assert(x1 >= x);
else if (x0 <= x)
} else if (x0 <= x) {
STBTT_assert(x1 <= x);
else if (x0 >= x+1)
} else if (x0 >= x+1) {
STBTT_assert(x1 >= x+1);
else
} else {
STBTT_assert(x1 >= x && x1 <= x+1);
}
if (x0 <= x && x1 <= x)
scanline[x] += e->direction * (y1-y0);