diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-04 13:27:10 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-04 13:29:17 +0300 |
commit | d3c815bd0831f46c18bb4bddc9f290b5f47e2c45 (patch) | |
tree | 6dc0fddd52da62faeaec8c9422997974e3437cf8 /source/blender/blenkernel/intern/colorband.c | |
parent | 0d69a5aa3491501c4a556aec3978128c041d328e (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/colorband.c')
-rw-r--r-- | source/blender/blenkernel/intern/colorband.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |