Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-23 05:51:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-23 05:54:33 +0300
commitd580c90469b4ba182bd8aa8e7a4e289884e426fe (patch)
tree4041254b413aa81d72bb89b4ebfdba8b507bfb22 /source/blender/bmesh/tools/bmesh_decimate_collapse.c
parentc26fa67bcd051e55960dadbcd5a6ee4fd1d0fb4a (diff)
CustomData: const correctness for interp()
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_collapse.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index ef1783cc693..85402544396 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -519,9 +519,11 @@ static void bm_edge_collapse_loop_customdata(BMesh *bm, BMLoop *l, BMVert *v_cle
if (CustomData_layer_has_math(&bm->ldata, i)) {
const int offset = bm->ldata.layers[i].offset;
const int type = bm->ldata.layers[i].type;
- void *cd_src[2] = {(char *)src[0] + offset,
- (char *)src[1] + offset};
- void *cd_iter = (char *)l_iter->head.data + offset;
+ const void *cd_src[2] = {
+ POINTER_OFFSET(src[0], offset),
+ POINTER_OFFSET(src[1], offset),
+ };
+ void *cd_iter = POINTER_OFFSET(l_iter->head.data, offset);
/* detect seams */
if (CustomData_data_equals(type, cd_src[0], cd_iter)) {