From 34257329263c3af108736b8d1047d48091e82d92 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Oct 2017 15:25:13 +1100 Subject: BLI_heap: minor changes to the API Recent addition of 'reinsert' didn't match logic for ghash API. Rename to BLI_heap_node_value_update, also add BLI_heap_insert_or_update since it's a common operation. --- source/blender/bmesh/tools/bmesh_decimate_collapse.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source/blender/bmesh/tools') diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index a081a1b70e4..0a1271c2aa9 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -337,12 +337,7 @@ static void bm_decim_build_edge_cost_single( } } - if (eheap_table[BM_elem_index_get(e)]) { - BLI_heap_reinsert(eheap, eheap_table[BM_elem_index_get(e)], cost); - } - else { - eheap_table[BM_elem_index_get(e)] = BLI_heap_insert(eheap, cost, e); - } + BLI_heap_insert_or_update(eheap, &eheap_table[BM_elem_index_get(e)], cost, e); return; clear: -- cgit v1.2.3