diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-11-30 08:28:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-11-30 08:30:08 +0300 |
commit | 500ec993f546e09661137cebf7d597661a8f53f0 (patch) | |
tree | 6d5f2c6333223edd8f84179143955c45e4f98de2 /source/blender/editors/mesh | |
parent | da279927b1ea6d1d7ee2272bd1188d10d443f12b (diff) |
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 8600d4491fa4b349cb80241382c503abaf9c5ce9.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 86ed594aa66..0a22d87c0bc 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -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. */ |