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
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-29 07:25:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-03 14:49:51 +0300
commit942b6e933bb4cab8eac24d2fc95dc40fc7e36dfd (patch)
treea4ff28018a86ab9de44deac1c48584457bcc2216 /tests
parenteaeb0a002eb78d7395b8fda87d3c9a138228e890 (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')
-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);