[Bf-blender-cvs] [2d589e8] master: Math Lib: avoid char > int conversion w/ line plot

Campbell Barton noreply at git.blender.org
Thu Sep 1 18:49:43 CEST 2016


Commit: 2d589e8549cb7d14436668f2a324fe2c75f159a3
Author: Campbell Barton
Date:   Tue Aug 9 16:57:26 2016 +1000
Branches: master
https://developer.blender.org/rB2d589e8549cb7d14436668f2a324fe2c75f159a3

Math Lib: avoid char > int conversion w/ line plot

===================================================================

M	source/blender/blenlib/intern/math_geom.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 40454a9..dd30f26 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -2892,8 +2892,8 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], bool (*callback)(int, int
 	int x2 = p2[0];
 	int y2 = p2[1];
 
-	signed char ix;
-	signed char iy;
+	int ix;
+	int iy;
 
 	/* if x1 == x2 or y1 == y2, then it does not matter what we set here */
 	int delta_x = (x2 > x1 ? ((void)(ix = 1), x2 - x1) : ((void)(ix = -1), x1 - x2)) << 1;




More information about the Bf-blender-cvs mailing list