From afadaaf8e0efe79e2fa1e108e5a2beb7a02182f4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 11 Feb 2014 18:40:37 +0100 Subject: [PATCH] Code cleanup: fix a few visual studio compiler warnings. --- source/blender/editors/include/ED_transverts.h | 2 +- source/blender/editors/include/ED_view3d.h | 2 +- source/blender/editors/sculpt_paint/paint_image.c | 2 +- source/blender/editors/space_view3d/view3d_view.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/include/ED_transverts.h b/source/blender/editors/include/ED_transverts.h index a82e54e425b..1df89b0a8f9 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 c10afd682fd..f84d42a89d9 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 463efedf957..dd638ab93cd 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 eae4406990d..d06f7869f9c 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;