From ccdacf1c9b31b15e188aa9e9adb044ffd0ca0da4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Feb 2018 23:36:11 +1100 Subject: Cleanup: use '_len' instead of '_size' w/ BLI API - When returning the number of items in a collection use BLI_*_len() - Keep _size() for size in bytes. - Keep _count() for data structures that don't store length (hint this isn't a simple getter). See P611 to apply instead of manually resolving conflicts. --- source/blender/editors/uvedit/uvedit_parametrizer.c | 4 ++-- source/blender/editors/uvedit/uvedit_smart_stitch.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/uvedit') diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 2a3a2b84223..f8a93bd2ce3 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -1291,7 +1291,7 @@ static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges) while (nedges > 2) { PEdge *ne, *ne1, *ne2; - e = (PEdge *)BLI_heap_popmin(heap); + e = (PEdge *)BLI_heap_pop_min(heap); e1 = p_boundary_edge_prev(e); e2 = p_boundary_edge_next(e); @@ -2190,7 +2190,7 @@ static void p_chart_simplify_compute(PChart *chart) break; HeapNode *link = BLI_heap_top(heap); - PEdge *edge = (PEdge *)BLI_heap_popmin(heap), *pair = edge->pair; + PEdge *edge = (PEdge *)BLI_heap_pop_min(heap), *pair = edge->pair; PVert *oldv, *keepv; PEdge *wheele, *nexte; diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index c2a38a90621..da36170310a 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1782,7 +1782,7 @@ static int stitch_init(bContext *C, wmOperator *op) } } - total_edges = BLI_ghash_size(edge_hash); + total_edges = BLI_ghash_len(edge_hash); state->edges = edges = MEM_mallocN(sizeof(*edges) * total_edges, "stitch_edges"); /* I assume any system will be able to at least allocate an iterator :p */ -- cgit v1.2.3