[Bf-blender-cvs] [768e4e991c] blender2.8: fix warning

Mike Erwin noreply at git.blender.org
Sat Feb 11 06:29:03 CET 2017


Commit: 768e4e991cc62129af4513a39c6ec9a75bd21f13
Author: Mike Erwin
Date:   Sat Feb 11 00:27:43 2017 -0500
Branches: blender2.8
https://developer.blender.org/rB768e4e991cc62129af4513a39c6ec9a75bd21f13

fix warning

Strip start & end are floating-point values, so clang expected fabsf here. Casting to int since we want a discrete number of vertices.

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

M	source/blender/editors/space_nla/nla_draw.c

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

diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 5843f9a603..9d34b6c4e2 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -306,7 +306,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc)
 		float cfra;
 		
 		/* plot the curve (over the strip's main region) */
-		immBegin(GL_LINE_STRIP, abs(strip->end - strip->start + 1));
+		immBegin(GL_LINE_STRIP, abs((int)(strip->end - strip->start) + 1));
 
 		/* sample at 1 frame intervals, and draw
 		 *	- min y-val is yminc, max is y-maxc, so clamp in those regions




More information about the Bf-blender-cvs mailing list