From d3c815bd0831f46c18bb4bddc9f290b5f47e2c45 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 4 Nov 2018 13:27:10 +0300 Subject: BLI_heap: add an API function to directly read the top node value. It is very commonly needed in loop conditions to check if the items in the heap are good enough to continue. --- source/blender/blenkernel/intern/colorband.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/colorband.c') diff --git a/source/blender/blenkernel/intern/colorband.c b/source/blender/blenkernel/intern/colorband.c index f72d4df725a..38631c76009 100644 --- a/source/blender/blenkernel/intern/colorband.c +++ b/source/blender/blenkernel/intern/colorband.c @@ -208,7 +208,7 @@ static void colorband_init_from_table_rgba_resample( } while ((carr_len > 1 && !BLI_heap_is_empty(heap)) && - ((carr_len >= MAXCOLORBAND) || (BLI_heap_node_value(BLI_heap_top(heap)) <= eps_2x))) + ((carr_len >= MAXCOLORBAND) || (BLI_heap_top_value(heap) <= eps_2x))) { c = BLI_heap_pop_min(heap); struct ColorResampleElem *c_next = c->next, *c_prev = c->prev; -- cgit v1.2.3