diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-24 12:50:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-24 12:50:29 +0400 |
commit | d0bd474375b1301173729e40561011c26626277f (patch) | |
tree | 53f25abce3023188773ab036ede4cecce205be58 /source | |
parent | ff0b24c4e23dfa050327af3000ef8902577f792d (diff) |
Custom Data API: redundant pointer-to-pointer arg
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_customdata.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 8 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_construct.c | 8 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_interp.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 5a1e173f0b3..9a6524cc9ab 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -310,7 +310,7 @@ void CustomData_set_layer_flag(struct CustomData *data, int type, int flag); void CustomData_bmesh_set_default(struct CustomData *data, void **block); void CustomData_bmesh_free_block(struct CustomData *data, void **block); -void CustomData_bmesh_free_block_data(struct CustomData *data, void **block); +void CustomData_bmesh_free_block_data(struct CustomData *data, void *block); /* copy custom data to/from layers as in mesh/derivedmesh, to editmesh * blocks of data. the CustomData's must not be compatible */ diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index ab3cf5851e9..63eb3b397b0 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2554,12 +2554,12 @@ void CustomData_bmesh_free_block(CustomData *data, void **block) /** * Same as #CustomData_bmesh_free_block but zero the memory rather then freeing. */ -void CustomData_bmesh_free_block_data(CustomData *data, void **block) +void CustomData_bmesh_free_block_data(CustomData *data, void *block) { const LayerTypeInfo *typeInfo; int i; - if (*block == NULL) + if (block == NULL) return; for (i = 0; i < data->totlayer; ++i) { @@ -2568,13 +2568,13 @@ void CustomData_bmesh_free_block_data(CustomData *data, void **block) if (typeInfo->free) { int offset = data->layers[i].offset; - typeInfo->free((char *)*block + offset, 1, typeInfo->size); + typeInfo->free((char *)block + offset, 1, typeInfo->size); } } } if (data->totsize) - memset(*block, 0, data->totsize); + memset(block, 0, data->totsize); } static void CustomData_bmesh_alloc_block(CustomData *data, void **block) diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c index eef1e7bbb4f..e0348fea636 100644 --- a/source/blender/bmesh/intern/bmesh_construct.c +++ b/source/blender/bmesh/intern/bmesh_construct.c @@ -505,7 +505,7 @@ static void bm_vert_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, return; } copy_v3_v3(target_vertex->no, source_vertex->no); - CustomData_bmesh_free_block_data(&target_mesh->vdata, &target_vertex->head.data); + CustomData_bmesh_free_block_data(&target_mesh->vdata, target_vertex->head.data); CustomData_bmesh_copy_data(&source_mesh->vdata, &target_mesh->vdata, source_vertex->head.data, &target_vertex->head.data); } @@ -517,7 +517,7 @@ static void bm_edge_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, BLI_assert(!"BMEdge: source and targer match"); return; } - CustomData_bmesh_free_block_data(&target_mesh->edata, &target_edge->head.data); + CustomData_bmesh_free_block_data(&target_mesh->edata, target_edge->head.data); CustomData_bmesh_copy_data(&source_mesh->edata, &target_mesh->edata, source_edge->head.data, &target_edge->head.data); } @@ -529,7 +529,7 @@ static void bm_loop_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, BLI_assert(!"BMLoop: source and targer match"); return; } - CustomData_bmesh_free_block_data(&target_mesh->ldata, &target_loop->head.data); + CustomData_bmesh_free_block_data(&target_mesh->ldata, target_loop->head.data); CustomData_bmesh_copy_data(&source_mesh->ldata, &target_mesh->ldata, source_loop->head.data, &target_loop->head.data); } @@ -542,7 +542,7 @@ static void bm_face_attrs_copy(BMesh *source_mesh, BMesh *target_mesh, return; } copy_v3_v3(target_face->no, source_face->no); - CustomData_bmesh_free_block_data(&target_mesh->pdata, &target_face->head.data); + CustomData_bmesh_free_block_data(&target_mesh->pdata, target_face->head.data); CustomData_bmesh_copy_data(&source_mesh->pdata, &target_mesh->pdata, source_face->head.data, &target_face->head.data); target_face->mat_nr = source_face->mat_nr; diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index 306b6e74350..a32f28169f6 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -54,7 +54,7 @@ static void bm_data_interp_from_elem(CustomData *data_layer, BMElem *ele1, BMEle /* do nothing */ } else { - CustomData_bmesh_free_block_data(data_layer, &ele_dst->head.data); + CustomData_bmesh_free_block_data(data_layer, ele_dst->head.data); CustomData_bmesh_copy_data(data_layer, data_layer, ele1->head.data, &ele_dst->head.data); } } @@ -63,7 +63,7 @@ static void bm_data_interp_from_elem(CustomData *data_layer, BMElem *ele1, BMEle /* do nothing */ } else { - CustomData_bmesh_free_block_data(data_layer, &ele_dst->head.data); + CustomData_bmesh_free_block_data(data_layer, ele_dst->head.data); CustomData_bmesh_copy_data(data_layer, data_layer, ele2->head.data, &ele_dst->head.data); } } |