[Bf-blender-cvs] [afadaaf] master: Code cleanup: fix a few visual studio compiler warnings.

Brecht Van Lommel noreply at git.blender.org
Tue Feb 11 18:53:06 CET 2014


Commit: afadaaf8e0efe79e2fa1e108e5a2beb7a02182f4
Author: Brecht Van Lommel
Date:   Tue Feb 11 18:40:37 2014 +0100
https://developer.blender.org/rBafadaaf8e0efe79e2fa1e108e5a2beb7a02182f4

Code cleanup: fix a few visual studio compiler warnings.

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

M	source/blender/editors/include/ED_transverts.h
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/space_view3d/view3d_view.c

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

diff --git a/source/blender/editors/include/ED_transverts.h b/source/blender/editors/include/ED_transverts.h
index a82e54e..1df89b0 100644
--- a/source/blender/editors/include/ED_transverts.h
+++ b/source/blender/editors/include/ED_transverts.h
@@ -45,7 +45,7 @@ typedef struct TransVertStore {
 	int transverts_tot;
 } TransVertStore;
 
-void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit, int mode);
+void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit, const int mode);
 void ED_transverts_update_obedit(TransVertStore *tvs, struct Object *obedit);
 void ED_transverts_free(TransVertStore *tvs);
 bool ED_transverts_check_obedit(Object *obedit);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index c10afd6..f84d42a 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -257,7 +257,7 @@ unsigned int view3d_sample_backbuf(struct ViewContext *vc, int x, int y);
 /* draws and does a 4x4 sample */
 bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d,
                         const int mval[2], float mouse_worldloc[3],
-                        bool alphaoverride, const float fallback_depth_pt[3]);
+                        const bool alphaoverride, const float fallback_depth_pt[3]);
 
 /* only draw so ED_view3d_autodist_simple can be called many times after */
 void ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 463efed..dd638ab 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -538,7 +538,7 @@ static void paint_stroke_update_step(bContext *C, struct PaintStroke *stroke, Po
 	if (BKE_brush_use_alpha_pressure(scene, brush))
 		BKE_brush_alpha_set(scene, brush, max_ff(0.0f, startalpha * pressure));
 	if (BKE_brush_use_size_pressure(scene, brush))
-		BKE_brush_size_set(scene, brush, max_ff(1.0f, startsize * pressure));
+		BKE_brush_size_set(scene, brush, (int)max_ff(1.0f, startsize * pressure));
 
 	if (pop->mode == PAINT_MODE_3D_PROJECT) {
 		paint_proj_stroke(C, pop->custom_paint, pop->prevmouse, mouse);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index eae4406..d06f786 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -724,7 +724,7 @@ bool ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winx, int winy
 /**
  * Use instead of: ``bglPolygonOffset(rv3d->dist, ...)`` see bug [#37727]
  */
-void ED_view3d_polygon_offset(const RegionView3D *rv3d, float dist)
+void ED_view3d_polygon_offset(const RegionView3D *rv3d, const float dist)
 {
 	float viewdist = rv3d->dist;




More information about the Bf-blender-cvs mailing list