From 512b879241d79bf91f70eecdc97944505d64bf6e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 29 Oct 2017 18:23:33 +1100 Subject: BLI_heap: add validation check, improve tests Also minor readability changes, avoid running both heap_up/down gives minor speedup too. --- source/blender/blenlib/BLI_heap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenlib/BLI_heap.h') diff --git a/source/blender/blenlib/BLI_heap.h b/source/blender/blenlib/BLI_heap.h index dcdbf53c0bb..d3f6d44e164 100644 --- a/source/blender/blenlib/BLI_heap.h +++ b/source/blender/blenlib/BLI_heap.h @@ -50,5 +50,7 @@ void BLI_heap_node_value_update_ptr(Heap *heap, HeapNode *node, float /* Return the value or pointer of a heap node. */ float BLI_heap_node_value(const HeapNode *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); void *BLI_heap_node_ptr(const HeapNode *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); +/* only for gtest */ +bool BLI_heap_is_valid(const Heap *heap); #endif /* __BLI_HEAP_H__ */ -- cgit v1.2.3