Revert "Fix: Const warning in editmesh_knife.c"
It's important the coordinates the knife is operating on are never
manipulated since it will cause problems which are difficult to
troubleshoot.
Instead, use a cast in the MEM_freeN(..) call.
This reverts commit 8600d4491f
.
This commit is contained in:
parent
da279927b1
commit
500ec993f5
|
@ -236,7 +236,7 @@ typedef struct KnifeTool_OpData {
|
|||
GHash *facetrimap;
|
||||
|
||||
KnifeBVH bvh;
|
||||
float (**cagecos)[3];
|
||||
const float (**cagecos)[3];
|
||||
|
||||
BLI_mempool *kverts;
|
||||
BLI_mempool *kedges;
|
||||
|
@ -3975,7 +3975,7 @@ static void knifetool_init_cagecos(KnifeTool_OpData *kcd, Object *ob, uint base_
|
|||
|
||||
BM_mesh_elem_index_ensure(em_eval->bm, BM_VERT);
|
||||
|
||||
kcd->cagecos[base_index] = BKE_editmesh_vert_coords_alloc(
|
||||
kcd->cagecos[base_index] = (const float(*)[3])BKE_editmesh_vert_coords_alloc(
|
||||
kcd->vc.depsgraph, em_eval, scene_eval, obedit_eval, NULL);
|
||||
}
|
||||
|
||||
|
@ -4143,7 +4143,7 @@ static void knifetool_exit_ex(KnifeTool_OpData *kcd)
|
|||
for (int i = 0; i < kcd->objects_len; i++) {
|
||||
knifetool_free_cagecos(kcd, i);
|
||||
}
|
||||
MEM_freeN(kcd->cagecos);
|
||||
MEM_freeN((void *)kcd->cagecos);
|
||||
knife_bvh_free(kcd);
|
||||
|
||||
/* Line-hits cleanup. */
|
||||
|
|
Loading…
Reference in New Issue