video: stb_truetype: simplify expression
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 18 Mar 2018 13:31:43 +0000 (14:31 +0100)
committerAnatolij Gustschin <agust@denx.de>
Mon, 19 Mar 2018 08:47:02 +0000 (09:47 +0100)
Eliminate (x2 - x2) which is always zero.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/video/stb_truetype.h

index 26e483c..5d00bff 100644 (file)
@@ -1993,7 +1993,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
 
                STBTT_assert(fabs(area) <= 1.01f);
 
-               scanline[x2] += area + sign * (1-((x2-x2)+(x_bottom-x2))/2) * (sy1-y_crossing);
+               scanline[x2] += area + sign * (1-(x_bottom-x2)/2) * (sy1-y_crossing);
 
                scanline_fill[x2] += sign * (sy1-sy0);
             }