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. --- tests/gtests/blenlib/BLI_heap_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/gtests') diff --git a/tests/gtests/blenlib/BLI_heap_test.cc b/tests/gtests/blenlib/BLI_heap_test.cc index 02729e7dcfb..e23e89b9cae 100644 --- a/tests/gtests/blenlib/BLI_heap_test.cc +++ b/tests/gtests/blenlib/BLI_heap_test.cc @@ -146,7 +146,7 @@ TEST(heap, ReInsertSimple) nodes[in] = BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in)); } for (int i = 0; i < items_total; i++) { - BLI_heap_reinsert(heap, nodes[i], (float)(items_total + i)); + BLI_heap_node_value_update(heap, nodes[i], (float)(items_total + i)); } for (int out_test = 0; out_test < items_total; out_test++) { @@ -168,7 +168,7 @@ TEST(heap, ReInsertRandom) } BLI_array_randomize(nodes, sizeof(HeapNode *), items_total, 1234); for (int i = 0; i < items_total; i++) { - BLI_heap_reinsert(heap, nodes[i], (float)i); + BLI_heap_node_value_update(heap, nodes[i], (float)i); } for (int out_test = 0; out_test < items_total; out_test++) { HeapNode *node_top = BLI_heap_top(heap); -- cgit v1.2.3