Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-29 07:25:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-29 07:47:06 +0300
commit34257329263c3af108736b8d1047d48091e82d92 (patch)
tree29307361dce6c7bfced0b7b0887278df3c00b568 /tests/gtests
parent336885bebaa8c7b60041b139f02a29da475cf3ea (diff)
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.
Diffstat (limited to 'tests/gtests')
-rw-r--r--tests/gtests/blenlib/BLI_heap_test.cc4
1 files changed, 2 insertions, 2 deletions
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);