Custom Data API: redundant pointer-to-pointer arg
This commit is contained in:
parent
ff0b24c4e2
commit
d0bd474375
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue