diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 02:34:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 02:34:20 +0400 |
commit | c1570d9f499b3fa8e45e5de386a23aef54d4f054 (patch) | |
tree | d3358e19d3f13d0f2041996678f2bbb3751747ea /source/blender/editors | |
parent | 145289ad958e43b3f4f8475c581fca2180f6be88 (diff) |
code cleanup: missed some min/max use of float[3], also found case of DO_MIN/MAX re-reading same value from array 4 times when it can do once (use minf rather then MIN2, same for maxf)
Diffstat (limited to 'source/blender/editors')
7 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index e8593e9b60d..e908868df75 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -44,7 +44,7 @@ void sculpt_get_redraw_planes(float planes[4][4], struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob); void ED_sculpt_force_update(struct bContext *C); float *ED_sculpt_get_last_stroke(struct Object *ob); -int ED_sculpt_minmax(struct bContext *C, float *min, float *max); +int ED_sculpt_minmax(struct bContext *C, float min[3], float max[3]); void ED_sculpt_mask_layers_ensure(struct Object *ob, struct MultiresModifierData *mmd); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2d3a7680963..02c0acfc367 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -107,7 +107,7 @@ float *ED_sculpt_get_last_stroke(struct Object *ob) return (ob && ob->sculpt && ob->sculpt->last_stroke_valid) ? ob->sculpt->last_stroke : NULL; } -int ED_sculpt_minmax(bContext *C, float *min, float *max) +int ED_sculpt_minmax(bContext *C, float min[3], float max[3]) { Object *ob = CTX_data_active_object(C); diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 2bb08a4b9b4..10ae96d87bf 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -156,7 +156,7 @@ static int convex(float *p0, float *up, float *a, float *b) return dot_v3v3(up, tmp) >= 0; } -void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow) +void draw_volume(ARegion *ar, GPUTexture *tex, float min[3], float max[3], int res[3], float dx, GPUTexture *tex_shadow) { RegionView3D *rv3d = ar->regiondata; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 60a0d3bf12b..bfd293ee5b6 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2175,7 +2175,7 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) if (obedit) { - ok = minmax_verts(obedit, min, max); /* only selected */ + ok = ED_view3d_minmax_verts(obedit, min, max); /* only selected */ } else if (ob && (ob->mode & OB_MODE_POSE)) { if (ob->pose) { diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index f387e1dd844..29edc0158d6 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -186,7 +186,7 @@ void view3d_toolshelf_register(struct ARegionType *art); void view3d_tool_props_register(struct ARegionType *art); /* view3d_snap.c */ -int minmax_verts(struct Object *obedit, float *min, float *max); +int ED_view3d_minmax_verts(struct Object *obedit, float min[3], float max[3]); void VIEW3D_OT_snap_selected_to_grid(struct wmOperatorType *ot); void VIEW3D_OT_snap_selected_to_cursor(struct wmOperatorType *ot); @@ -202,7 +202,7 @@ ARegion *view3d_has_tools_region(ScrArea *sa); extern const char *view3d_context_dir[]; /* doc access */ /* draw_volume.c */ -void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float *min, float *max, int res[3], float dx, struct GPUTexture *tex_shadow); +void draw_volume(struct ARegion *ar, struct GPUTexture *tex, float min[3], float max[3], int res[3], float dx, struct GPUTexture *tex_shadow); /* workaround for trivial but noticeable camera bug caused by imprecision * between view border calculation in 2D/3D space, workaround for bug [#28037]. diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 367b36db583..dfb3714948b 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -211,7 +211,7 @@ static void set_mapped_co(void *vuserdata, int index, const float co[3], /* mode flags: */ #define TM_ALL_JOINTS 1 /* all joints (for bones only) */ #define TM_SKIP_HANDLES 2 /* skip handles when control point is selected (for curves only) */ -static void make_trans_verts(Object *obedit, float *min, float *max, int mode) +static void make_trans_verts(Object *obedit, float min[3], float max[3], int mode) { Nurb *nu; BezTriple *bezt; @@ -1062,7 +1062,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot) /* **************************************************** */ -int minmax_verts(Object *obedit, float *min, float *max) +int ED_view3d_minmax_verts(Object *obedit, float min[3], float max[3]) { TransVert *tv; float centroid[3], vec[3], bmat[3][3]; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 5ac7bb6860c..d596c553f7e 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -444,7 +444,7 @@ static float p_edge_uv_length(PEdge *e) return sqrt(d[0] * d[0] + d[1] * d[1]); } -static void p_chart_uv_bbox(PChart *chart, float *minv, float *maxv) +static void p_chart_uv_bbox(PChart *chart, float minv[2], float maxv[2]) { PVert *v; |