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-28 20:42:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-28 20:42:58 +0300
commit4af1af70ad41015d0126837e856d87b930f61655 (patch)
treeba792d315f1400f2042b2d1b529beee85e7388d8 /source/blender/blenlib/BLI_heap.h
parentb84e3dc7f390c7b8251fb4d8c10557693157cd31 (diff)
BLI_hash: add BLI_heap_reinsert
Allows avoiding remove/insert calls.
Diffstat (limited to 'source/blender/blenlib/BLI_heap.h')
-rw-r--r--source/blender/blenlib/BLI_heap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h
index ea361097b7b..cf18dfa5d2e 100644
--- a/source/blender/blenlib/BLI_heap.h
+++ b/source/blender/blenlib/BLI_heap.h
@@ -47,6 +47,9 @@ HeapNode *BLI_heap_insert(Heap *heap, float value, void *ptr) ATTR_NONNULL
/* Remove a heap node. */
void BLI_heap_remove(Heap *heap, HeapNode *node) ATTR_NONNULL(1, 2);
+/* Set new value for existing node. */
+void BLI_heap_reinsert(Heap *heap, HeapNode *node, float value);
+
/* Return 0 if the heap is empty, 1 otherwise. */
bool BLI_heap_is_empty(Heap *heap) ATTR_NONNULL(1);