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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-11-04 13:27:10 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-11-04 13:29:17 +0300
commitd3c815bd0831f46c18bb4bddc9f290b5f47e2c45 (patch)
tree6dc0fddd52da62faeaec8c9422997974e3437cf8 /source/blender/editors/mesh/editmesh_tools.c
parent0d69a5aa3491501c4a556aec3978128c041d328e (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/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index c11aefb7e14..b16195023c9 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7868,10 +7868,10 @@ static int edbm_average_normals_exec(bContext *C, wmOperator *op)
BLI_SMALLSTACK_DECLARE(loops, BMLoop *);
float wnor[3], avg_normal[3] = { 0.0f }, count = 0;
- float val = BLI_heap_node_value(BLI_heap_top(loop_weight));
+ float val = BLI_heap_top_value(loop_weight);
while (!BLI_heap_is_empty(loop_weight)) {
- const float cur_val = BLI_heap_node_value(BLI_heap_top(loop_weight));
+ const float cur_val = BLI_heap_top_value(loop_weight);
if (!compare_ff(val, cur_val, threshold)) {
count++;
val = cur_val;