correct invalid sizeof() use in bmesh (harmless in practice)
This commit is contained in:
parent
8119791703
commit
a4b922ad9b
|
@ -523,7 +523,7 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int len, const
|
|||
/* --- */
|
||||
|
||||
/* create edges and find the winding (if faces are attached to any existing edges) */
|
||||
vert_arr_map = MEM_mallocN(sizeof(BMVert **) * len, __func__);
|
||||
vert_arr_map = MEM_mallocN(sizeof(BMVert *) * len, __func__);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
vert_arr_map[i] = vert_arr[vang[i].index];
|
||||
|
|
|
@ -507,13 +507,13 @@ bool BMO_slot_bool_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
|
|||
void *BMO_slot_as_arrayN(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, int *len)
|
||||
{
|
||||
BMOpSlot *slot = BMO_slot_get(slot_args, slot_name);
|
||||
void *ret;
|
||||
void **ret;
|
||||
|
||||
/* could add support for mapping type */
|
||||
BLI_assert(slot->slot_type == BMO_OP_SLOT_ELEMENT_BUF);
|
||||
|
||||
ret = MEM_mallocN(sizeof(void **) * slot->len, __func__);
|
||||
memcpy(ret, slot->data.buf, sizeof(void **) * slot->len);
|
||||
ret = MEM_mallocN(sizeof(void *) * slot->len, __func__);
|
||||
memcpy(ret, slot->data.buf, sizeof(void *) * slot->len);
|
||||
*len = slot->len;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
|
|||
* this connectivity could be used rather then treating
|
||||
* them as a bunch of isolated verts. */
|
||||
|
||||
BMVert **vert_arr = MEM_mallocN(sizeof(BMVert **) * totv, __func__);
|
||||
BMVert **vert_arr = MEM_mallocN(sizeof(BMVert *) * totv, __func__);
|
||||
BMFace *f;
|
||||
|
||||
BMO_iter_as_array(op->slots_in, "geom", BM_VERT, (void **)vert_arr, totv);
|
||||
|
|
|
@ -250,7 +250,7 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
|
|||
BM_mesh_elem_hflag_disable_all(bm, BM_VERT, BM_ELEM_TAG, false);
|
||||
}
|
||||
|
||||
verts_loop = MEM_mallocN(sizeof(BMVert **) * verts_loop_tot, __func__);
|
||||
verts_loop = MEM_mallocN(sizeof(BMVert *) * verts_loop_tot, __func__);
|
||||
verts_loop_tot = 0; /* count up again */
|
||||
|
||||
BMO_ITER (f_src, &oiter, op->slots_in, "faces", BM_FACE) {
|
||||
|
|
Loading…
Reference in New Issue