From 14b2d51069ef4e9932faf289d5027dc504f84853 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen Date: Sat, 26 Mar 2016 09:16:28 +0100 Subject: [PATCH] Fixed dangling else warnings. --- stb_truetype.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stb_truetype.h b/stb_truetype.h index bfb1841..aafb4c0 100644 --- a/stb_truetype.h +++ b/stb_truetype.h @@ -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);