[Bf-blender-cvs] [ccf99ea3b47] greasepencil-object: Cleanup more compiler warnings

Antonio Vazquez noreply at git.blender.org
Thu Mar 1 19:03:23 CET 2018


Commit: ccf99ea3b4769e9e1df69b69d450eaaac0a5d9ae
Author: Antonio Vazquez
Date:   Thu Mar 1 18:43:36 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBccf99ea3b4769e9e1df69b69d450eaaac0a5d9ae

Cleanup more compiler warnings

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

M	source/blender/editors/gpencil/drawgpencil.c
M	source/blender/editors/gpencil/gpencil_brush.c
M	source/blender/editors/gpencil/gpencil_paint.c
M	source/blender/editors/gpencil/gpencil_utils.c

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

diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index b4086d1f0eb..3d2c9ae894a 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -718,7 +718,7 @@ static void gp_draw_stroke_3d(tGPDdraw *tgpw, short thickness, const float ink[4
 	bGPDspoint *points = tgpw->gps->points;
 	int totpoints = tgpw->gps->totpoints;
 
-	float viewport[2] = { tgpw->winx, tgpw->winy };
+	const float viewport[2] = { (float)tgpw->winx, (float)tgpw->winy };
 	float curpressure = points[0].pressure;
 	float fpt[3];
 
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 3713d748646..a365446f45d 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -575,7 +575,8 @@ static void gp_brush_calc_midpoint(tGP_BrushEditData *gso)
 		float *rvec = ED_view3d_cursor3d_get(gso->scene, v3d);
 		float zfac = ED_view3d_calc_zfac(rv3d, rvec, NULL);
 		
-		float mval_f[2] = {UNPACK2(gso->mval)};
+		float mval_f[2];
+		copy_v2fl_v2i(mval_f, gso->mval);
 		float mval_prj[2];
 		float dvec[3];
 		
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index a3d6ecb6cd6..38ed0aa20bf 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -366,7 +366,8 @@ static void gp_stroke_convertcoords(tGPsdata *p, const int mval[2], float out[3]
 		else {
 			float mval_prj[2];
 			float rvec[3], dvec[3];
-			float mval_f[2] = {UNPACK2(mval)};
+			float mval_f[2];
+			copy_v2fl_v2i(mval_f, mval);
 			float zfac;
 		
 			/* Current method just converts each point in screen-coordinates to
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index e39c2f9ed0f..c5533353e76 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -680,7 +680,8 @@ bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, Scene *scene, const float screen
 	View3D *v3d = gsc->sa->spacedata.first;
 	RegionView3D *rv3d = gsc->ar->regiondata;
 	float *rvec = ED_view3d_cursor3d_get(scene, v3d);
-	float ref[3] = {rvec[0], rvec[1], rvec[2]};
+	float ref[3];
+	copy_v3_v3(ref, rvec);
 	float zfac = ED_view3d_calc_zfac(rv3d, rvec, NULL);
 	
 	float mval_f[2], mval_prj[2];



More information about the Bf-blender-cvs mailing list