diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-23 05:51:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-23 05:54:33 +0300 |
commit | d580c90469b4ba182bd8aa8e7a4e289884e426fe (patch) | |
tree | 4041254b413aa81d72bb89b4ebfdba8b507bfb22 /source/blender/bmesh/operators | |
parent | c26fa67bcd051e55960dadbcd5a6ee4fd1d0fb4a (diff) |
CustomData: const correctness for interp()
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r-- | source/blender/bmesh/operators/bmo_fill_grid.c | 7 | ||||
-rw-r--r-- | source/blender/bmesh/operators/bmo_inset.c | 12 |
2 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c index 40f6937245b..dd954adcd55 100644 --- a/source/blender/bmesh/operators/bmo_fill_grid.c +++ b/source/blender/bmesh/operators/bmo_fill_grid.c @@ -159,7 +159,7 @@ static void bm_loop_pair_test_copy(BMLoop *l_pair_a[2], BMLoop *l_pair_b[2]) */ static void bm_loop_interp_from_grid_boundary_4(BMesh *bm, BMLoop *l, BMLoop *l_bound[4], const float w[4]) { - void *l_cdata[4] = { + const void *l_cdata[4] = { l_bound[0]->head.data, l_bound[1]->head.data, l_bound[2]->head.data, @@ -170,8 +170,7 @@ static void bm_loop_interp_from_grid_boundary_4(BMesh *bm, BMLoop *l, BMLoop *l_ static void bm_loop_interp_from_grid_boundary_2(BMesh *bm, BMLoop *l, BMLoop *l_bound[2], const float t) { - - void *l_cdata[2] = { + const void *l_cdata[2] = { l_bound[0]->head.data, l_bound[1]->head.data}; @@ -346,7 +345,7 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const unsigned int xt if (use_vert_interp) { const float *w = weight_table[XY(x, y)]; - void *v_cdata[4] = { + const void *v_cdata[4] = { v_grid[XY(x, 0)]->head.data, v_grid[XY(0, y)]->head.data, v_grid[XY(x, ytot - 1)]->head.data, diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index b7914e84c50..27e140eb990 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -390,8 +390,10 @@ static void bmo_face_inset_individual( if (use_interpolate) { - BM_face_interp_from_face_ex(bm, iface->f, iface->f, true, - iface->blocks_l, iface->blocks_v, iface->cos_2d, iface->axis_mat); + BM_face_interp_from_face_ex( + bm, iface->f, iface->f, true, + (const void **)iface->blocks_l, (const void **)iface->blocks_v, + iface->cos_2d, iface->axis_mat); /* build rim faces */ l_iter = l_first; @@ -993,8 +995,10 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) for (i = 0; i < iface_array_len; i++) { if (iface_array[i]) { InterpFace *iface = iface_array[i]; - BM_face_interp_from_face_ex(bm, iface->f, iface->f, true, - iface->blocks_l, iface->blocks_v, iface->cos_2d, iface->axis_mat); + BM_face_interp_from_face_ex( + bm, iface->f, iface->f, true, + (const void **)iface->blocks_l, (const void **)iface->blocks_v, + iface->cos_2d, iface->axis_mat); } } } |