Cleanup: use '_len' instead of '_size' w/ BLI API
authorCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 12:36:11 +0000 (23:36 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 15 Feb 2018 12:39:08 +0000 (23:39 +1100)
- 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.

75 files changed:
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/colorband.c
source/blender/blenkernel/intern/curve_decimate.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/outliner_treehash.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/blenlib/BLI_edgehash.h
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_gsqueue.h
source/blender/blenlib/BLI_heap.h
source/blender/blenlib/BLI_kdopbvh.h
source/blender/blenlib/BLI_linklist_stack.h
source/blender/blenlib/BLI_mempool.h
source/blender/blenlib/BLI_smallhash.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_heap.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/BLI_mempool.c
source/blender/blenlib/intern/array_store.c
source/blender/blenlib/intern/astar.c
source/blender/blenlib/intern/edgehash.c
source/blender/blenlib/intern/gsqueue.c
source/blender/blenlib/intern/polyfill2d_beautify.c
source/blender/blenlib/intern/smallhash.c
source/blender/blenlib/intern/task.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/writefile.c
source/blender/blentranslation/msgfmt/msgfmt.c
source/blender/bmesh/intern/bmesh_iterators.c
source/blender/bmesh/intern/bmesh_log.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/operators/bmo_connect_pair.c
source/blender/bmesh/operators/bmo_rotate_edges.c
source/blender/bmesh/operators/bmo_subdivide_edgering.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/tools/bmesh_beautify.c
source/blender/bmesh/tools/bmesh_decimate_collapse.c
source/blender/bmesh/tools/bmesh_edgenet.c
source/blender/bmesh/tools/bmesh_intersect.c
source/blender/bmesh/tools/bmesh_path.c
source/blender/bmesh/tools/bmesh_region_match.c
source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
source/blender/depsgraph/intern/depsgraph_eval.cc
source/blender/depsgraph/intern/eval/deg_eval.cc
source/blender/depsgraph/intern/eval/deg_eval_flush.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/curve/editcurve_select.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/imbuf/intern/moviecache.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/python/bmesh/bmesh_py_ops_call.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_rna.c
tests/gtests/blenlib/BLI_ghash_performance_test.cc
tests/gtests/blenlib/BLI_ghash_test.cc
tests/gtests/blenlib/BLI_heap_test.cc
tests/gtests/blenlib/BLI_kdopbvh_test.cc
tests/gtests/blenlib/BLI_polyfill2d_test.cc

index 775499304d4d1a5fcf639c6938bfcac76e3873bf..cd2c7194237897c101b8477008f7b00d632a9364 100644 (file)
@@ -411,7 +411,7 @@ static BVHTree *bvhtree_from_editmesh_verts_create_tree(
                        BMVert *eve = BM_vert_at_index(em->bm, i);
                        BLI_bvhtree_insert(tree, i, eve->co, 1);
                }
-               BLI_assert(BLI_bvhtree_get_size(tree) == verts_num_active);
+               BLI_assert(BLI_bvhtree_get_len(tree) == verts_num_active);
                BLI_bvhtree_balance(tree);
        }
 
@@ -440,7 +440,7 @@ static BVHTree *bvhtree_from_mesh_verts_create_tree(
                        }
                        BLI_bvhtree_insert(tree, i, vert[i].co, 1);
                }
-               BLI_assert(BLI_bvhtree_get_size(tree) == verts_num_active);
+               BLI_assert(BLI_bvhtree_get_len(tree) == verts_num_active);
                BLI_bvhtree_balance(tree);
        }
 
@@ -612,7 +612,7 @@ static BVHTree *bvhtree_from_editmesh_edges_create_tree(
 
                        BLI_bvhtree_insert(tree, i, co[0], 2);
                }
-               BLI_assert(BLI_bvhtree_get_size(tree) == edges_num_active);
+               BLI_assert(BLI_bvhtree_get_len(tree) == edges_num_active);
                BLI_bvhtree_balance(tree);
        }
 
@@ -829,7 +829,7 @@ static BVHTree *bvhtree_from_mesh_faces_create_tree(
                                        BLI_bvhtree_insert(tree, i, co[0], face[i].v4 ? 4 : 3);
                                }
                        }
-                       BLI_assert(BLI_bvhtree_get_size(tree) == faces_num_active);
+                       BLI_assert(BLI_bvhtree_get_len(tree) == faces_num_active);
                        BLI_bvhtree_balance(tree);
                }
        }
@@ -990,7 +990,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree(
                                        }
                                }
                        }
-                       BLI_assert(BLI_bvhtree_get_size(tree) == looptri_num_active);
+                       BLI_assert(BLI_bvhtree_get_len(tree) == looptri_num_active);
                        BLI_bvhtree_balance(tree);
                }
        }
@@ -1032,7 +1032,7 @@ static BVHTree *bvhtree_from_mesh_looptri_create_tree(
                                        BLI_bvhtree_insert(tree, i, co[0], 3);
                                }
                        }
-                       BLI_assert(BLI_bvhtree_get_size(tree) == looptri_num_active);
+                       BLI_assert(BLI_bvhtree_get_len(tree) == looptri_num_active);
                        BLI_bvhtree_balance(tree);
                }
        }
index d3b106835efd3de8296bb9baae4040bb92341700..d65427a861b0e7ef23602f19cc1e678f170d1afd 100644 (file)
@@ -3435,7 +3435,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm)
                }
        }
 
-       numEdges = BLI_edgeset_size(eh);
+       numEdges = BLI_edgeset_len(eh);
 
        /* write new edges into a temporary CustomData */
        CustomData_reset(&edgeData);
@@ -3504,7 +3504,7 @@ void CDDM_calc_edges(DerivedMesh *dm)
                }
        }
 
-       numEdges = BLI_edgehash_size(eh);
+       numEdges = BLI_edgehash_len(eh);
 
        /* write new edges into a temporary CustomData */
        CustomData_reset(&edgeData);
index d35e797ddac90b5b7409890f08789e6f8fb1ebde..f72d4df725ad8183051ee496483d284eeae81f4b 100644 (file)
@@ -210,7 +210,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)))
        {
-               c = BLI_heap_popmin(heap);
+               c = BLI_heap_pop_min(heap);
                struct ColorResampleElem *c_next = c->next, *c_prev = c->prev;
                c_prev->next = c_next;
                c_next->prev = c_prev;
index 7983c63c99d9c138d21c30eb56a283341f885841..1a6c4714afd91fad082f81ee1025d051a0d68f61 100644 (file)
@@ -159,7 +159,7 @@ static void curve_decimate(
                struct Knot *k;
 
                {
-                       struct Removal *r = BLI_heap_popmin(heap);
+                       struct Removal *r = BLI_heap_pop_min(heap);
                        k = &knots[r->knot_index];
                        k->heap_node = NULL;
                        k->prev->handles[1] = r->handles[0];
index 46f8e637cf835290847a180c68586efad75c3833..99423ee26a6586a2c809a6299a8d508eb45d560d 100644 (file)
@@ -2026,7 +2026,7 @@ void BKE_library_make_local(
        GSet *loop_tags = BLI_gset_ptr_new(__func__);
        for (LinkNode *it = todo_ids; it; it = it->next) {
                library_make_local_copying_check(it->link, loop_tags, bmain->relations, done_ids);
-               BLI_assert(BLI_gset_size(loop_tags) == 0);
+               BLI_assert(BLI_gset_len(loop_tags) == 0);
        }
        BLI_gset_free(loop_tags, NULL);
        BLI_gset_free(done_ids, NULL);
index bf937267b83ae75a3ea87a1e761bd41dbf24323d..689ebc7e90910000312c04a2ceaf46f2122bfda4 100644 (file)
@@ -1003,7 +1003,7 @@ static void make_edges_mdata_extend(MEdge **r_alledge, int *r_totedge,
                BKE_mesh_poly_edgehash_insert(eh, mp, mloop + mp->loopstart);
        }
 
-       totedge_new = BLI_edgehash_size(eh);
+       totedge_new = BLI_edgehash_len(eh);
 
 #ifdef DEBUG
        /* ensure that theres no overlap! */
index 4aeddbb4c4539057f24125a4be2a77aab0734b66..62c9210b8f55455320060266c33b74ed17848036 100644 (file)
@@ -1486,7 +1486,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
                }
        }
 
-       totedge = BLI_edgehash_size(eh);
+       totedge = BLI_edgehash_len(eh);
 
        /* write new edges into a temporary CustomData */
        CustomData_reset(&edata);
index 74766bec9a8ed48acf444b241eca37c0ae3d38f4..00f5f0f84b6ab41a79717a9dfce5e28d96d88d2f 100644 (file)
@@ -2787,7 +2787,7 @@ int BKE_node_instance_hash_haskey(bNodeInstanceHash *hash, bNodeInstanceKey key)
 
 int BKE_node_instance_hash_size(bNodeInstanceHash *hash)
 {
-       return BLI_ghash_size(hash->ghash);
+       return BLI_ghash_len(hash->ghash);
 }
 
 void BKE_node_instance_hash_clear_tags(bNodeInstanceHash *hash)
index 4f92509827f65ace3a22d12a354617afb15c3dd2..2726064d634fa57d1bcd6622c1db3c23303499e0 100644 (file)
@@ -539,7 +539,7 @@ bool *BKE_object_defgroup_validmap_get(Object *ob, const int defbase_tot)
                BLI_ghash_insert(gh, dg->name, NULL);
        }
 
-       BLI_assert(BLI_ghash_size(gh) == defbase_tot);
+       BLI_assert(BLI_ghash_len(gh) == defbase_tot);
 
        /* now loop through the armature modifiers and identify deform bones */
        for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob, &virtualModifierData) : md->next) {
@@ -574,7 +574,7 @@ bool *BKE_object_defgroup_validmap_get(Object *ob, const int defbase_tot)
                defgroup_validmap[i] = (BLI_ghash_lookup(gh, dg->name) != NULL);
        }
 
-       BLI_assert(i == BLI_ghash_size(gh));
+       BLI_assert(i == BLI_ghash_len(gh));
 
        BLI_ghash_free(gh, NULL, NULL);
 
index 4d97121e2a3f024c5836c89df371bc837cd86fbc..9db9b2ddf54c97db02eaeafb8e36022c1f272d70 100644 (file)
@@ -112,7 +112,7 @@ static void fill_treehash(void *treehash, BLI_mempool *treestore)
 
 void *BKE_outliner_treehash_create_from_treestore(BLI_mempool *treestore)
 {
-       GHash *treehash = BLI_ghash_new_ex(tse_hash, tse_cmp, "treehash", BLI_mempool_count(treestore));
+       GHash *treehash = BLI_ghash_new_ex(tse_hash, tse_cmp, "treehash", BLI_mempool_len(treestore));
        fill_treehash(treehash, treestore);
        return treehash;
 }
@@ -126,7 +126,7 @@ void *BKE_outliner_treehash_rebuild_from_treestore(void *treehash, BLI_mempool *
 {
        BLI_assert(treehash);
 
-       BLI_ghash_clear_ex(treehash, NULL, free_treehash_group, BLI_mempool_count(treestore));
+       BLI_ghash_clear_ex(treehash, NULL, free_treehash_group, BLI_mempool_len(treestore));
        fill_treehash(treehash, treestore);
        return treehash;
 }
index d926c96c0d871ae273e927af743c4614356aa373..51d50b061de50a0b2c310bb4d91a8fcc37ddb905 100644 (file)
@@ -1294,7 +1294,7 @@ void BKE_pbvh_get_grid_updates(PBVH *bvh, bool clear, void ***r_gridfaces, int *
 
        pbvh_iter_end(&iter);
        
-       const int tot = BLI_gset_size(face_set);
+       const int tot = BLI_gset_len(face_set);
        if (tot == 0) {
                *r_totface = 0;
                *r_gridfaces = NULL;
@@ -1433,8 +1433,8 @@ void BKE_pbvh_node_num_verts(
                        if (r_uniquevert) *r_uniquevert = node->uniq_verts;
                        break;
                case PBVH_BMESH:
-                       tot = BLI_gset_size(node->bm_unique_verts);
-                       if (r_totvert) *r_totvert = tot + BLI_gset_size(node->bm_other_verts);
+                       tot = BLI_gset_len(node->bm_unique_verts);
+                       if (r_totvert) *r_totvert = tot + BLI_gset_len(node->bm_other_verts);
                        if (r_uniquevert) *r_uniquevert = tot;
                        break;
        }
index 587cc78705736c9a9ef79c6e1950ad4a7fc3cac4..6b6f2605dc36315f269fc1088d4a3032521e93d2 100644 (file)
@@ -255,7 +255,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde
        const int cd_face_node_offset = bvh->cd_face_node_offset;
        PBVHNode *n = &bvh->nodes[node_index];
 
-       if (BLI_gset_size(n->bm_faces) <= bvh->leaf_limit) {
+       if (BLI_gset_len(n->bm_faces) <= bvh->leaf_limit) {
                /* Node limit not exceeded */
                pbvh_bmesh_node_finalize(bvh, node_index, cd_vert_node_offset, cd_face_node_offset);
                return;
@@ -289,8 +289,8 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde
                 *c2 = &bvh->nodes[children + 1];
        c1->flag |= PBVH_Leaf;
        c2->flag |= PBVH_Leaf;
-       c1->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_size(n->bm_faces) / 2);
-       c2->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_size(n->bm_faces) / 2);
+       c1->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_len(n->bm_faces) / 2);
+       c2->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_len(n->bm_faces) / 2);
 
        /* Partition the parent node's faces between the two children */
        GSET_ITER (gs_iter, n->bm_faces) {
@@ -305,11 +305,11 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde
 
        /* Enforce at least one primitive in each node */
        GSet *empty = NULL, *other;
-       if (BLI_gset_size(c1->bm_faces) == 0) {
+       if (BLI_gset_len(c1->bm_faces) == 0) {
                empty = c1->bm_faces;
                other = c2->bm_faces;
        }
-       else if (BLI_gset_size(c2->bm_faces) == 0) {
+       else if (BLI_gset_len(c2->bm_faces) == 0) {
                empty = c2->bm_faces;
                other = c1->bm_faces;
        }
@@ -375,7 +375,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde
 static bool pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index)
 {
        GSet *bm_faces = bvh->nodes[node_index].bm_faces;
-       const int bm_faces_size = BLI_gset_size(bm_faces);
+       const int bm_faces_size = BLI_gset_len(bm_faces);
        if (bm_faces_size <= bvh->leaf_limit) {
                /* Node limit not exceeded */
                return false;
@@ -1238,7 +1238,7 @@ static bool pbvh_bmesh_subdivide_long_edges(
        bool any_subdivided = false;
 
        while (!BLI_heap_is_empty(eq_ctx->q->heap)) {
-               BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap);
+               BMVert **pair = BLI_heap_pop_min(eq_ctx->q->heap);
                BMVert *v1 = pair[0], *v2 = pair[1];
                BMEdge *e;
 
@@ -1455,7 +1455,7 @@ static bool pbvh_bmesh_collapse_short_edges(
        GHash *deleted_verts = BLI_ghash_ptr_new("deleted_verts");
 
        while (!BLI_heap_is_empty(eq_ctx->q->heap)) {
-               BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap);
+               BMVert **pair = BLI_heap_pop_min(eq_ctx->q->heap);
                BMVert *v1  = pair[0], *v2  = pair[1];
                BLI_mempool_free(eq_ctx->pool, pair);
                pair = NULL;
@@ -2011,10 +2011,10 @@ void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node)
        if (node->bm_orco)
                return;
 
-       const int totvert = BLI_gset_size(node->bm_unique_verts) +
-                           BLI_gset_size(node->bm_other_verts);
+       const int totvert = BLI_gset_len(node->bm_unique_verts) +
+                           BLI_gset_len(node->bm_other_verts);
 
-       const int tottri = BLI_gset_size(node->bm_faces);
+       const int tottri = BLI_gset_len(node->bm_faces);
 
        node->bm_orco = MEM_mallocN(sizeof(*node->bm_orco) * totvert, __func__);
        node->bm_ortri = MEM_mallocN(sizeof(*node->bm_ortri) * tottri, __func__);
@@ -2189,12 +2189,12 @@ static void pbvh_bmesh_verify(PBVH *bvh)
                int totface = 0, totvert = 0;
                for (int i = 0; i < bvh->totnode; i++) {
                        PBVHNode *n = &bvh->nodes[i];
-                       totface += n->bm_faces ? BLI_gset_size(n->bm_faces) : 0;
-                       totvert += n->bm_unique_verts ? BLI_gset_size(n->bm_unique_verts) : 0;
+                       totface += n->bm_faces ? BLI_gset_len(n->bm_faces) : 0;
+                       totvert += n->bm_unique_verts ? BLI_gset_len(n->bm_unique_verts) : 0;
                }
 
-               BLI_assert(totface == BLI_gset_size(faces_all));
-               BLI_assert(totvert == BLI_gset_size(verts_all));
+               BLI_assert(totface == BLI_gset_len(faces_all));
+               BLI_assert(totvert == BLI_gset_len(verts_all));
        }
 
        {
index 20272dd97cdd6a9167111b473e26fa09895ca9f1..417892012659e626eee609ced2e3c6ec3788adec 100644 (file)
@@ -59,7 +59,7 @@ bool            BLI_edgehash_remove(EdgeHash *eh, unsigned int v0, unsigned int
 
 void           *BLI_edgehash_popkey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
 bool            BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
-int             BLI_edgehash_size(EdgeHash *eh) ATTR_WARN_UNUSED_RESULT;
+int             BLI_edgehash_len(EdgeHash *eh) ATTR_WARN_UNUSED_RESULT;
 void            BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP valfreefp,
                                       const unsigned int nentries_reserve);
 void            BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
@@ -104,7 +104,7 @@ typedef struct EdgeSetIterator EdgeSetIterator;
 EdgeSet *BLI_edgeset_new_ex(const char *info,
                             const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
 EdgeSet *BLI_edgeset_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
-int      BLI_edgeset_size(EdgeSet *es) ATTR_WARN_UNUSED_RESULT;
+int      BLI_edgeset_len(EdgeSet *es) ATTR_WARN_UNUSED_RESULT;
 bool     BLI_edgeset_add(EdgeSet *es, unsigned int v0, unsigned int v1);
 void     BLI_edgeset_insert(EdgeSet *es, unsigned int v0, unsigned int v1);
 bool     BLI_edgeset_haskey(EdgeSet *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
index b4819ff4e55e615222da5b39c526fdad99b91779..7a2d992490496b3fececbd6e0d649bed1f6d311c 100644 (file)
@@ -110,7 +110,7 @@ void   BLI_ghash_clear_ex(
 void  *BLI_ghash_popkey(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp) ATTR_WARN_UNUSED_RESULT;
 bool   BLI_ghash_haskey(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
 bool   BLI_ghash_pop(GHash *gh, GHashIterState *state, void **r_key, void **r_val) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-unsigned int BLI_ghash_size(GHash *gh) ATTR_WARN_UNUSED_RESULT;
+unsigned int BLI_ghash_len(GHash *gh) ATTR_WARN_UNUSED_RESULT;
 void   BLI_ghash_flag_set(GHash *gh, unsigned int flag);
 void   BLI_ghash_flag_clear(GHash *gh, unsigned int flag);
 
@@ -261,7 +261,7 @@ GSet  *BLI_gset_new_ex(
         const unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
 GSet  *BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
 GSet  *BLI_gset_copy(GSet *gs, GSetKeyCopyFP keycopyfp) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
-unsigned int BLI_gset_size(GSet *gs) ATTR_WARN_UNUSED_RESULT;
+unsigned int BLI_gset_len(GSet *gs) ATTR_WARN_UNUSED_RESULT;
 void   BLI_gset_flag_set(GSet *gs, unsigned int flag);
 void   BLI_gset_flag_clear(GSet *gs, unsigned int flag);
 void   BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp);
@@ -309,8 +309,8 @@ BLI_INLINE bool BLI_gsetIterator_done(GSetIterator *gsi) { return BLI_ghashItera
 
 /* For testing, debugging only */
 #ifdef GHASH_INTERNAL_API
-int BLI_ghash_buckets_size(GHash *gh);
-int BLI_gset_buckets_size(GSet *gs);
+int BLI_ghash_buckets_len(GHash *gh);
+int BLI_gset_buckets_len(GSet *gs);
 
 double BLI_ghash_calc_quality_ex(
         GHash *gh, double *r_load, double *r_variance,
index 4600d6f63259289e1d4d2cd12097c212f36914dd..ef0e0f3ab31afe69e3673aabaa3b04b3ffbab022 100644 (file)
@@ -36,11 +36,11 @@ typedef struct _GSQueue GSQueue;
 
 GSQueue    *BLI_gsqueue_new(size_t elem_size);
 bool        BLI_gsqueue_is_empty(GSQueue *gq);
-int         BLI_gsqueue_size(GSQueue *gq);
+int         BLI_gsqueue_len(GSQueue *gq);
 void        BLI_gsqueue_peek(GSQueue *gq, void *r_item);
 void        BLI_gsqueue_pop(GSQueue *gq, void *r_item);
 void        BLI_gsqueue_push(GSQueue *gq, const void *item);
-void        BLI_gsqueue_pushback(GSQueue *gq, const void *item);
+void        BLI_gsqueue_push_back(GSQueue *gq, const void *item);
 void        BLI_gsqueue_free(GSQueue *gq);
 
 #endif /* __BLI_GSQUEUE_H__ */
index d3f6d44e164b5f72d8258881fb13d229f17e0cd4..19e162d777f5c7400fa9818e426dc2361e23f0ad 100644 (file)
@@ -41,9 +41,9 @@ HeapNode       *BLI_heap_insert(Heap *heap, float value, void *ptr) ATTR_NONNULL
 void            BLI_heap_insert_or_update(Heap *heap, HeapNode **node_p, float value, void *ptr) ATTR_NONNULL(1, 2);
 void            BLI_heap_remove(Heap *heap, HeapNode *node) ATTR_NONNULL(1, 2);
 bool            BLI_heap_is_empty(const Heap *heap) ATTR_NONNULL(1);
-unsigned int    BLI_heap_size(const Heap *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
+unsigned int    BLI_heap_len(const Heap *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
 HeapNode       *BLI_heap_top(const Heap *heap) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
-void           *BLI_heap_popmin(Heap *heap) ATTR_NONNULL(1);
+void           *BLI_heap_pop_min(Heap *heap) ATTR_NONNULL(1);
 void            BLI_heap_node_value_update(Heap *heap, HeapNode *node, float value) ATTR_NONNULL(1, 2);
 void            BLI_heap_node_value_update_ptr(Heap *heap, HeapNode *node, float value, void *ptr) ATTR_NONNULL(1, 2);
 
index 564659ad21ee02ca813f03dc1b30cac8dfe55681..db53035dc7b9bac5b68b058fe9ffdaa909de4580 100644 (file)
@@ -129,7 +129,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(
         const BVHTree *tree1, const BVHTree *tree2, unsigned int *r_overlap_tot,
         BVHTree_OverlapCallback callback, void *userdata);
 
-int   BLI_bvhtree_get_size(const BVHTree *tree);
+int   BLI_bvhtree_get_len(const BVHTree *tree);
 
 float BLI_bvhtree_get_epsilon(const BVHTree *tree);
 
index dd92dcec936f444e51a1f6761115924ccd15bf63..dd6d737f111674db7ad4c71950c919d589cef76d 100644 (file)
@@ -60,7 +60,7 @@
 } (void)0
 
 #define BLI_LINKSTACK_SIZE(var) \
-       BLI_mempool_count(var##_pool_)
+       BLI_mempool_len(var##_pool_)
 
 /* check for typeof() */
 #ifdef __GNUC__
index b68ca6b1f2b4b1403aa32ffe780300ff5d4fa60f..45efb8d7ef10834457c4e0b30d6554a71a177311 100644 (file)
@@ -53,7 +53,7 @@ void         BLI_mempool_clear_ex(BLI_mempool *pool,
                                   const int totelem_reserve) ATTR_NONNULL(1);
 void         BLI_mempool_clear(BLI_mempool *pool) ATTR_NONNULL(1);
 void         BLI_mempool_destroy(BLI_mempool *pool) ATTR_NONNULL(1);
-int          BLI_mempool_count(BLI_mempool *pool) ATTR_NONNULL(1);
+int          BLI_mempool_len(BLI_mempool *pool) ATTR_NONNULL(1);
 void        *BLI_mempool_findelem(BLI_mempool *pool, unsigned int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
 
 void        BLI_mempool_as_table(BLI_mempool *pool, void **data) ATTR_NONNULL(1, 2);
index e096354e5b1c4958d9c7d53ef448fab102097574..495fc94a53c70948d45f880dee6d36987eb78f3e 100644 (file)
@@ -66,7 +66,7 @@ bool    BLI_smallhash_remove(SmallHash *sh, uintptr_t key) ATTR_NONNULL(1);
 void   *BLI_smallhash_lookup(const SmallHash *sh, uintptr_t key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
 void  **BLI_smallhash_lookup_p(const SmallHash *sh, uintptr_t key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
 bool    BLI_smallhash_haskey(const SmallHash *sh, uintptr_t key) ATTR_NONNULL(1);
-int     BLI_smallhash_count(const SmallHash *sh)  ATTR_NONNULL(1);
+int     BLI_smallhash_len(const SmallHash *sh)  ATTR_NONNULL(1);
 void   *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key)  ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
 void  **BLI_smallhash_iternext_p(SmallHashIter *iter, uintptr_t *key)  ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
 void   *BLI_smallhash_iternew(const SmallHash *sh, SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
index 60da6b39cbe86080e192df2a4392d1321de10b18..84e25daa348f0f77b7533124353d15cfec722924 100644 (file)
@@ -177,7 +177,7 @@ void BLI_thread_queue_free(ThreadQueue *queue);
 void BLI_thread_queue_push(ThreadQueue *queue, void *work);
 void *BLI_thread_queue_pop(ThreadQueue *queue);
 void *BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms);
-int BLI_thread_queue_size(ThreadQueue *queue);
+int BLI_thread_queue_len(ThreadQueue *queue);
 bool BLI_thread_queue_is_empty(ThreadQueue *queue);
 
 void BLI_thread_queue_wait_finish(ThreadQueue *queue);
index bf2f25fae6912bc481c8a7a9a3955b6018cc3dcf..edfbccca660704931c7c2fe755bd0181c25c59fe 100644 (file)
@@ -741,7 +741,7 @@ void BLI_ghash_reserve(GHash *gh, const uint nentries_reserve)
 /**
  * \return size of the GHash.
  */
-uint BLI_ghash_size(GHash *gh)
+uint BLI_ghash_len(GHash *gh)
 {
        return gh->nentries;
 }
@@ -1010,7 +1010,7 @@ void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfree
  */
 void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
 {
-       BLI_assert((int)gh->nentries == BLI_mempool_count(gh->entrypool));
+       BLI_assert((int)gh->nentries == BLI_mempool_len(gh->entrypool));
        if (keyfreefp || valfreefp)
                ghash_free_cb(gh, keyfreefp, valfreefp);
 
@@ -1044,7 +1044,7 @@ void BLI_ghash_flag_clear(GHash *gh, uint flag)
 /**
  * Create a new GHashIterator. The hash table must not be mutated
  * while the iterator is in use, and the iterator will step exactly
- * BLI_ghash_size(gh) times before becoming done.
+ * BLI_ghash_len(gh) times before becoming done.
  *
  * \param gh The GHash to iterate over.
  * \return Pointer to a new DynStr.
@@ -1059,7 +1059,7 @@ GHashIterator *BLI_ghashIterator_new(GHash *gh)
 /**
  * Init an already allocated GHashIterator. The hash table must not
  * be mutated while the iterator is in use, and the iterator will
- * step exactly BLI_ghash_size(gh) times before becoming done.
+ * step exactly BLI_ghash_len(gh) times before becoming done.
  *
  * \param ghi The GHashIterator to initialize.
  * \param gh The GHash to iterate over.
@@ -1398,7 +1398,7 @@ GSet *BLI_gset_copy(GSet *gs, GHashKeyCopyFP keycopyfp)
        return (GSet *)ghash_copy((GHash *)gs, keycopyfp, NULL);
 }
 
-uint BLI_gset_size(GSet *gs)
+uint BLI_gset_len(GSet *gs)
 {
        return ((GHash *)gs)->nentries;
 }
@@ -1618,13 +1618,13 @@ GSet *BLI_gset_pair_new(const char *info)
 /**
  * \return number of buckets in the GHash.
  */
-int BLI_ghash_buckets_size(GHash *gh)
+int BLI_ghash_buckets_len(GHash *gh)
 {
        return (int)gh->nbuckets;
 }
-int BLI_gset_buckets_size(GSet *gs)
+int BLI_gset_buckets_len(GSet *gs)
 {
-       return BLI_ghash_buckets_size((GHash *)gs);
+       return BLI_ghash_buckets_len((GHash *)gs);
 }
 
 /**
index 7c24934454138ac70b1fa03a195651d4b020a022..0c71e75e40fe37e312f34fa3000e5b7bbf2522d7 100644 (file)
@@ -303,7 +303,7 @@ bool BLI_heap_is_empty(const Heap *heap)
        return (heap->size == 0);
 }
 
-uint BLI_heap_size(const Heap *heap)
+uint BLI_heap_len(const Heap *heap)
 {
        return heap->size;
 }
@@ -320,7 +320,7 @@ HeapNode *BLI_heap_top(const Heap *heap)
 /**
  * Pop the top node off the heap and return it's pointer.
  */
-void *BLI_heap_popmin(Heap *heap)
+void *BLI_heap_pop_min(Heap *heap)
 {
        BLI_assert(heap->size != 0);
 
@@ -348,7 +348,7 @@ void BLI_heap_remove(Heap *heap, HeapNode *node)
                i = p;
        }
 
-       BLI_heap_popmin(heap);
+       BLI_heap_pop_min(heap);
 }
 
 /**
index 9c055a227a942169c19e700919b7a00042adc650..d6c587806033cae6ed864f0f59695bcafa206943 100644 (file)
@@ -1147,7 +1147,7 @@ void BLI_bvhtree_update_tree(BVHTree *tree)
  * Number of times #BLI_bvhtree_insert has been called.
  * mainly useful for asserts functions to check we added the correct number.
  */
-int BLI_bvhtree_get_size(const BVHTree *tree)
+int BLI_bvhtree_get_len(const BVHTree *tree)
 {
        return tree->totleaf;
 }
index 5b13f129ad4f18eb955cf79c2548ea3978dce017..3a65e6c42ca36a9e8d106fa4565c7238982363ed 100644 (file)
@@ -474,7 +474,7 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
        }
 }
 
-int BLI_mempool_count(BLI_mempool *pool)
+int BLI_mempool_len(BLI_mempool *pool)
 {
        return (int)pool->totused;
 }
index 5b1715bbb3dcbf953d4bb2465d626659967dc740..acf15b1c892efa3960199a635d9591953c16232f 100644 (file)
@@ -1759,7 +1759,7 @@ bool BLI_array_store_is_valid(
                                goto user_finally;
                        }
                }
-               if (!(BLI_mempool_count(bs->memory.chunk_list) == (int)BLI_ghash_size(chunk_list_map))) {
+               if (!(BLI_mempool_len(bs->memory.chunk_list) == (int)BLI_ghash_len(chunk_list_map))) {
                        ok = false;
                        goto user_finally;
                }
@@ -1772,11 +1772,11 @@ bool BLI_array_store_is_valid(
                                totrefs += 1;
                        }
                }
-               if (!(BLI_mempool_count(bs->memory.chunk) == (int)BLI_ghash_size(chunk_map))) {
+               if (!(BLI_mempool_len(bs->memory.chunk) == (int)BLI_ghash_len(chunk_map))) {
                        ok = false;
                        goto user_finally;
                }
-               if (!(BLI_mempool_count(bs->memory.chunk_ref) == totrefs)) {
+               if (!(BLI_mempool_len(bs->memory.chunk_ref) == totrefs)) {
                        ok = false;
                        goto user_finally;
                }
index 0020dbe4612ca1950afd6064925712c1336d82b8..1b57dc5a68356f701cd82465b05dceea83c2de74 100644 (file)
@@ -231,7 +231,7 @@ bool BLI_astar_graph_solve(
                        SET_INT_IN_POINTER(node_index_src));
 
        while (!BLI_heap_is_empty(todo_nodes)) {
-               const int node_curr_idx = GET_INT_FROM_POINTER(BLI_heap_popmin(todo_nodes));
+               const int node_curr_idx = GET_INT_FROM_POINTER(BLI_heap_pop_min(todo_nodes));
                BLI_AStarGNode *node_curr = &as_graph->nodes[node_curr_idx];
                LinkData *ld;
 
index 772c8bd6247e1780f17bb240cb00d67d73e0ec5b..7074a776aaf8250f95e61ed32b9d7685bc158d34 100644 (file)
@@ -527,7 +527,7 @@ bool BLI_edgehash_haskey(EdgeHash *eh, uint v0, uint v1)
 /**
  * Return number of keys in hash.
  */
-int BLI_edgehash_size(EdgeHash *eh)
+int BLI_edgehash_len(EdgeHash *eh)
 {
        return (int)eh->nentries;
 }
@@ -565,7 +565,7 @@ void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp)
 
 void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp)
 {
-       BLI_assert((int)eh->nentries == BLI_mempool_count(eh->epool));
+       BLI_assert((int)eh->nentries == BLI_mempool_len(eh->epool));
 
        if (valfreefp)
                edgehash_free_cb(eh, valfreefp);
@@ -599,7 +599,7 @@ void BLI_edgehash_flag_clear(EdgeHash *eh, uint flag)
 /**
  * Create a new EdgeHashIterator. The hash table must not be mutated
  * while the iterator is in use, and the iterator will step exactly
- * BLI_edgehash_size(eh) times before becoming done.
+ * BLI_edgehash_len(eh) times before becoming done.
  */
 EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh)
 {
@@ -611,7 +611,7 @@ EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh)
 /**
  * Init an already allocated EdgeHashIterator. The hash table must not
  * be mutated while the iterator is in use, and the iterator will
- * step exactly BLI_edgehash_size(eh) times before becoming done.
+ * step exactly BLI_edgehash_len(eh) times before becoming done.
  *
  * \param ehi The EdgeHashIterator to initialize.
  * \param eh The EdgeHash to iterate over.
@@ -729,7 +729,7 @@ EdgeSet *BLI_edgeset_new(const char *info)
        return BLI_edgeset_new_ex(info, 0);
 }
 
-int BLI_edgeset_size(EdgeSet *es)
+int BLI_edgeset_len(EdgeSet *es)
 {
        return (int)((EdgeHash *)es)->nentries;
 }
index 25da77019248a8f79f39b266fe2a7ba5a4a19dfe..5c8c43ab92a882eb321255b672b5d4baa1b7fa12 100644 (file)
@@ -81,7 +81,7 @@ bool BLI_gsqueue_is_empty(GSQueue *gq)
 /**
  * Query number elements in the queue
  */
-int BLI_gsqueue_size(GSQueue *gq)
+int BLI_gsqueue_len(GSQueue *gq)
 { 
        GSQueueElem *elem;
        int size = 0;
@@ -162,7 +162,7 @@ void BLI_gsqueue_push(GSQueue *gq, const void *item)
  * \param item A pointer to an appropriately
  * sized structure (the size passed to BLI_gsqueue_new).
  */
-void BLI_gsqueue_pushback(GSQueue *gq, const void *item)
+void BLI_gsqueue_push_back(GSQueue *gq, const void *item)
 {
        GSQueueElem *elem = MEM_mallocN(sizeof(*elem) + gq->elem_size, "gqueue_push");
        memcpy(elem->data, item, gq->elem_size);
index c0c95da5c6395a36892adffc541e9057168c6639..625c54d0e9bce3d8753a15aabe687187bdd5ee30 100644 (file)
@@ -401,7 +401,7 @@ void BLI_polyfill_beautify(
        }
 
        while (BLI_heap_is_empty(eheap) == false) {
-               struct HalfEdge *e = BLI_heap_popmin(eheap);
+               struct HalfEdge *e = BLI_heap_pop_min(eheap);
                eheap_table[e->base_index] = NULL;
 
                polyedge_rotate(half_edges, e);
index 1b862ffe005679e611e8491ffc452b192b8fe232..56d77abed24f56cad5ed7fd8898da794a9f65344 100644 (file)
@@ -310,7 +310,7 @@ bool BLI_smallhash_haskey(const SmallHash *sh, uintptr_t key)
        return (e != NULL);
 }
 
-int BLI_smallhash_count(const SmallHash *sh)
+int BLI_smallhash_len(const SmallHash *sh)
 {
        return (int)sh->nentries;
 }
index 05cfe4f3972f7e71ffce34a6cfa0eeb89925895f..c892ffbfd4a16d648fac520b5951f575a910807b 100644 (file)
@@ -1329,7 +1329,7 @@ void BLI_task_parallel_mempool(
        ParallelMempoolState state;
        int i, num_threads, num_tasks;
 
-       if (BLI_mempool_count(mempool) == 0) {
+       if (BLI_mempool_len(mempool) == 0) {
                return;
        }
 
index 2f9617018017d54dd0b88e3cfc9e517bc96fa235..9dc458fa0b95b792b14272f2ae9445f2b0a722c0 100644 (file)
@@ -773,12 +773,12 @@ void *BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms)
        return work;
 }
 
-int BLI_thread_queue_size(ThreadQueue *queue)
+int BLI_thread_queue_len(ThreadQueue *queue)
 {
        int size;
 
        pthread_mutex_lock(&queue->mutex);
-       size = BLI_gsqueue_size(queue->queue);
+       size = BLI_gsqueue_len(queue->queue);
        pthread_mutex_unlock(&queue->mutex);
 
        return size;
index 5941f96041c2a1d1de3e811dfdf4b21e72443e8d..5afab804929dc7ca88a9c588d3936e1ab42d220e 100644 (file)
@@ -2826,7 +2826,7 @@ static void write_soops(WriteData *wd, SpaceOops *so)
        if (ts) {
                SpaceOops so_flat = *so;
 
-               int elems = BLI_mempool_count(ts);
+               int elems = BLI_mempool_len(ts);
                /* linearize mempool to array */
                TreeStoreElem *data = elems ? BLI_mempool_as_arrayN(ts, "TreeStoreElem") : NULL;
 
index 49f850f200c6fd72a346056598f42d335a82ba22..a155cce53a57d74f80e56a6957bd20a83a3d9d28 100644 (file)
@@ -186,7 +186,7 @@ typedef struct Offset {
 /* Return the generated binary output. */
 static char *generate(GHash *messages, size_t *r_output_size)
 {
-       const uint32_t num_keys = BLI_ghash_size(messages);
+       const uint32_t num_keys = BLI_ghash_len(messages);
 
        /* Get list of sorted keys. */
        char **keys = get_keys_sorted(messages, num_keys);
index 96154f051f93a7c430d747e2d0d8150c095c4903..9fe28561b935f8cc88853b1635043611b8eff829 100644 (file)
@@ -430,7 +430,7 @@ int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const
 void bmiter__elem_of_mesh_begin(struct BMIter__elem_of_mesh *iter)
 {
 #ifdef USE_IMMUTABLE_ASSERT
-       ((BMIter *)iter)->count = BLI_mempool_count(iter->pooliter.pool);
+       ((BMIter *)iter)->count = BLI_mempool_len(iter->pooliter.pool);
 #endif
        BLI_mempool_iternew(iter->pooliter.pool, &iter->pooliter);
 }
@@ -438,7 +438,7 @@ void bmiter__elem_of_mesh_begin(struct BMIter__elem_of_mesh *iter)
 void *bmiter__elem_of_mesh_step(struct BMIter__elem_of_mesh *iter)
 {
 #ifdef USE_IMMUTABLE_ASSERT
-       BLI_assert(((BMIter *)iter)->count <= BLI_mempool_count(iter->pooliter.pool));
+       BLI_assert(((BMIter *)iter)->count <= BLI_mempool_len(iter->pooliter.pool));
 #endif
        return BLI_mempool_iterstep(&iter->pooliter);
 }
index 1d16dbc183659116f815e085d5904698a002b55a..5ae72851c7eca59d5dc226ce3acd021ec35af1a0 100644 (file)
@@ -990,11 +990,11 @@ void BM_log_all_added(BMesh *bm, BMLog *log)
        BMFace *f;
 
        /* avoid unnecessary resizing on initialization */
-       if (BLI_ghash_size(log->current_entry->added_verts) == 0) {
+       if (BLI_ghash_len(log->current_entry->added_verts) == 0) {
                BLI_ghash_reserve(log->current_entry->added_verts, (uint)bm->totvert);
        }
 
-       if (BLI_ghash_size(log->current_entry->added_faces) == 0) {
+       if (BLI_ghash_len(log->current_entry->added_faces) == 0) {
                BLI_ghash_reserve(log->current_entry->added_faces, (uint)bm->totface);
        }
 
index 0f672a9ff2af766e8ee7fc247a4381b051cada70..f814767a200b789f0f7359e155db72467d04468d 100644 (file)
@@ -673,7 +673,7 @@ int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
 {
        BMOpSlot *slot = BMO_slot_get(slot_args, slot_name);
        BLI_assert(slot->slot_type == BMO_OP_SLOT_MAPPING);
-       return BLI_ghash_size(slot->data.ghash);
+       return BLI_ghash_len(slot->data.ghash);
 }
 
 /* inserts a key/value mapping into a mapping slot.  note that it copies the
index 60fd9808fcb5d7fbdcc13aa208e2ac3b888b5b0e..b9e5cd927c3ba2dbdfb76214da00abe40eebd7a3 100644 (file)
@@ -662,11 +662,11 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
        while (!BLI_heap_is_empty(pc.states)) {
 
 #ifdef DEBUG_PRINT
-               printf("\n%s: stepping %u\n", __func__, BLI_heap_size(pc.states));
+               printf("\n%s: stepping %u\n", __func__, BLI_heap_len(pc.states));
 #endif
 
                while (!BLI_heap_is_empty(pc.states)) {
-                       PathLinkState *state = BLI_heap_popmin(pc.states);
+                       PathLinkState *state = BLI_heap_pop_min(pc.states);
 
                        /* either we insert this into 'pc.states' or its freed */
                        bool continue_search;
index 9832fdb57d375be3f196efc2baf58cc116b53bba..75e31c68dae5a0e89e4ef8aedcb2363ec5c3dda6 100644 (file)
@@ -180,7 +180,7 @@ static void bm_rotate_edges_shared(
 
                const int edges_len_rotate_prev = edges_len_rotate;
                while (!BLI_heap_is_empty(heap)) {
-                       BMEdge *e_best = BLI_heap_popmin(heap);
+                       BMEdge *e_best = BLI_heap_pop_min(heap);
                        eheap_table[BM_elem_index_get(e_best)] = NULL;
 
                        /* No problem if this fails, re-evaluate if faces connected to this edge are touched. */
index adcc0c71629ea48890480404fa91cf96182e5d37..e6881f6d8b1afcf044de769b03666dd27c5a205d 100644 (file)
@@ -269,7 +269,7 @@ static GSet *bm_edgering_pair_calc(BMesh *bm, ListBase *eloops_rim)
 
        BLI_ghash_free(vert_eloop_gh, NULL, NULL);
 
-       if (BLI_gset_size(eloop_pair_gs) == 0) {
+       if (BLI_gset_len(eloop_pair_gs) == 0) {
                BLI_gset_free(eloop_pair_gs, NULL);
                eloop_pair_gs = NULL;
        }
@@ -1193,7 +1193,7 @@ void bmo_subdivide_edgering_exec(BMesh *bm, BMOperator *op)
                        goto cleanup;
                }
 
-               lpair_arr = BLI_array_alloca(lpair_arr, BLI_gset_size(eloop_pairs_gs));
+               lpair_arr = BLI_array_alloca(lpair_arr, BLI_gset_len(eloop_pairs_gs));
 
                /* first cache pairs */
                GSET_ITER_INDEX (gs_iter, eloop_pairs_gs, i) {
index 4e8bace59e0ad6706dbc9a32045621839eb5b248..2cdc26466493bd5f5bf14611c7e8ac209f161944 100644 (file)
@@ -106,7 +106,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
                /* sf_edge = */ BLI_scanfill_edge_add(&sf_ctx, UNPACK2(sf_verts));
                /* sf_edge->tmp.p = e; */ /* UNUSED */
        }
-       nors_tot = BLI_ghash_size(sf_vert_map);
+       nors_tot = BLI_ghash_len(sf_vert_map);
        BLI_ghash_free(sf_vert_map, NULL, NULL);
        
 
index 6e6242fc9f9788ddf7908a3f5c989d36af01c9c2..81f0b4822a29eb9491d8c51c4a475909ec468999 100644 (file)
@@ -392,7 +392,7 @@ void BM_mesh_beautify_fill(
        bm->elem_index_dirty |= BM_EDGE;
 
        while (BLI_heap_is_empty(eheap) == false) {
-               BMEdge *e = BLI_heap_popmin(eheap);
+               BMEdge *e = BLI_heap_pop_min(eheap);
                i = BM_elem_index_get(e);
                eheap_table[i] = NULL;
 
index 0a1271c2aa9e1f69f9f3071e15b231173cf90a0b..3aa9e5278bca8bb5e758e6259e7373b2de6f8ce0 100644 (file)
@@ -1357,7 +1357,7 @@ void BM_mesh_decimate_collapse(
                       (BLI_heap_node_value(BLI_heap_top(eheap)) != COST_INVALID))
                {
                        // const float value = BLI_heap_node_value(BLI_heap_top(eheap));
-                       BMEdge *e = BLI_heap_popmin(eheap);
+                       BMEdge *e = BLI_heap_pop_min(eheap);
                        float optimize_co[3];
                        BLI_assert(BM_elem_index_get(e) < tot_edge_orig);  /* handy to detect corruptions elsewhere */
 
@@ -1388,7 +1388,7 @@ void BM_mesh_decimate_collapse(
                         * - edges sharing a vertex are ignored, so the pivot vertex isnt moved to one side.
                         */
 
-                       BMEdge *e = BLI_heap_popmin(eheap);
+                       BMEdge *e = BLI_heap_pop_min(eheap);
                        const int e_index = BM_elem_index_get(e);
                        const int e_index_mirr = edge_symmetry_map[e_index];
                        BMEdge *e_mirr = NULL;
index 193a032b46ee156c0b2ef73e974bd84d0dff1fa0..df9d07036afe0904c11b93054f0e6ded1b49dbc5 100644 (file)
@@ -335,7 +335,7 @@ static LinkNode *bm_edgenet_path_calc(
                                BLI_linklist_free_pool(v_ls_next, NULL, path_pool);
                                BLI_linklist_free_pool(v_ls_prev, NULL, path_pool);
 
-                               // BLI_assert(BLI_mempool_count(path_pool) == 0);
+                               // BLI_assert(BLI_mempool_len(path_pool) == 0);
 
                                path_len = bm_edgenet_path_from_pass(e_found->v1, &path, vnet_info, path_pool);
                                BLI_linklist_reverse(&path);
@@ -505,7 +505,7 @@ void BM_mesh_edgenet(
                }
 
                BLI_linklist_free_pool(path, NULL, path_pool);
-               BLI_assert(BLI_mempool_count(path_pool) == 0);
+               BLI_assert(BLI_mempool_len(path_pool) == 0);
        }
 
        bm->elem_index_dirty |= BM_FACE | BM_LOOP;
index 9d1b20cb4d24e201f56d1faeeef9e9b5400eaace..acadb66381060664a0f85fa396f09bc7c0579ece 100644 (file)
@@ -1275,8 +1275,8 @@ bool BM_mesh_intersect(
                        }
                }
 
-               splice_ls = MEM_mallocN(BLI_gset_size(s.wire_edges) * sizeof(*splice_ls), __func__);
-               STACK_INIT(splice_ls, BLI_gset_size(s.wire_edges));
+               splice_ls = MEM_mallocN(BLI_gset_len(s.wire_edges) * sizeof(*splice_ls), __func__);
+               STACK_INIT(splice_ls, BLI_gset_len(s.wire_edges));
 
                for (node = s.vert_dissolve; node; node = node->next) {
                        BMEdge *e_pair[2];
@@ -1690,7 +1690,7 @@ bool BM_mesh_intersect(
                }
        }
 
-       has_edit_isect = (BLI_ghash_size(s.face_edges) != 0);
+       has_edit_isect = (BLI_ghash_len(s.face_edges) != 0);
 
        /* cleanup */
        BLI_ghash_free(s.edgetri_cache, NULL, NULL);
index 85c591b6684e74f78b0c1e55162eb33fe8530fb2..cc5ac6dd8cee6cd4c4436bc62ff127248e7b2e29 100644 (file)
@@ -174,7 +174,7 @@ LinkNode *BM_mesh_calc_path_vert(
        cost[BM_elem_index_get(v_src)] = 0.0f;
 
        while (!BLI_heap_is_empty(heap)) {
-               v = BLI_heap_popmin(heap);
+               v = BLI_heap_pop_min(heap);
 
                if (v == v_dst)
                        break;
@@ -346,7 +346,7 @@ LinkNode *BM_mesh_calc_path_edge(
        cost[BM_elem_index_get(e_src)] = 0.0f;
 
        while (!BLI_heap_is_empty(heap)) {
-               e = BLI_heap_popmin(heap);
+               e = BLI_heap_pop_min(heap);
 
                if (e == e_dst)
                        break;
@@ -532,7 +532,7 @@ LinkNode *BM_mesh_calc_path_face(
        cost[BM_elem_index_get(f_src)] = 0.0f;
 
        while (!BLI_heap_is_empty(heap)) {
-               f = BLI_heap_popmin(heap);
+               f = BLI_heap_pop_min(heap);
 
                if (f == f_dst)
                        break;
index 2abf8f2c46e57542555e5f0aee22bb258c4a15b1..e83ba73ad01cb4f28d8ff3d959fc219376e0c32b 100644 (file)
@@ -421,8 +421,8 @@ static void bm_uuidwalk_rehash(
        UUID_Int *uuid_store;
        uint i;
 
-       uint rehash_store_len_new = MAX2(BLI_ghash_size(uuidwalk->verts_uuid),
-                                                BLI_ghash_size(uuidwalk->faces_uuid));
+       uint rehash_store_len_new = MAX2(BLI_ghash_len(uuidwalk->verts_uuid),
+                                                BLI_ghash_len(uuidwalk->faces_uuid));
 
        bm_uuidwalk_rehash_reserve(uuidwalk, rehash_store_len_new);
        uuid_store = uuidwalk->cache.rehash_store;
@@ -520,8 +520,8 @@ static void bm_uuidwalk_pass_add(
        verts_uuid_pass = uuidwalk->cache.verts_uuid;
        faces_step_next = uuidwalk->cache.faces_step;
 
-       BLI_assert(BLI_ghash_size(verts_uuid_pass) == 0);
-       BLI_assert(BLI_gset_size(faces_step_next) == 0);
+       BLI_assert(BLI_ghash_len(verts_uuid_pass) == 0);
+       BLI_assert(BLI_gset_len(faces_step_next) == 0);
 
        /* Add the face_step data from connected faces, creating new passes */
        fstep = BLI_mempool_alloc(uuidwalk->step_pool);
@@ -659,7 +659,7 @@ static bool bm_uuidwalk_facestep_begin(
        LinkNode *f_link, *f_link_next, **f_link_prev_p;
        bool ok = false;
 
-       BLI_assert(BLI_ghash_size(uuidwalk->cache.faces_from_uuid) == 0);
+       BLI_assert(BLI_ghash_len(uuidwalk->cache.faces_from_uuid) == 0);
        BLI_assert(BLI_listbase_is_empty(&fstep->items));
 
        f_link_prev_p = &fstep->faces;
@@ -864,7 +864,7 @@ static BMFace **bm_mesh_region_match_pair(
                        break;
                }
 
-               found = (BLI_ghash_size(w_dst->faces_uuid) == faces_src_region_len);
+               found = (BLI_ghash_len(w_dst->faces_uuid) == faces_src_region_len);
                if (found) {
                        break;
                }
@@ -877,7 +877,7 @@ static BMFace **bm_mesh_region_match_pair(
 
        if (found) {
                GHashIterator gh_iter;
-               const uint faces_result_len = BLI_ghash_size(w_dst->faces_uuid);
+               const uint faces_result_len = BLI_ghash_len(w_dst->faces_uuid);
                uint i;
 
                faces_result = MEM_mallocN(sizeof(*faces_result) * (faces_result_len + 1), __func__);
index b76cd9eaadda629536ebb2ce037e916046f44afc..7b93434710b2d4ba549f7eda2c62cc00ad9f7a58 100644 (file)
@@ -355,7 +355,7 @@ static void deg_debug_graphviz_node(const DebugContext &ctx,
                case DEG_NODE_TYPE_ID_REF:
                {
                        const IDDepsNode *id_node = (const IDDepsNode *)node;
-                       if (BLI_ghash_size(id_node->components) == 0) {
+                       if (BLI_ghash_len(id_node->components) == 0) {
                                deg_debug_graphviz_node_single(ctx, node);
                        }
                        else {
@@ -406,7 +406,7 @@ static bool deg_debug_graphviz_is_cluster(const DepsNode *node)
                case DEG_NODE_TYPE_ID_REF:
                {
                        const IDDepsNode *id_node = (const IDDepsNode *)node;
-                       return BLI_ghash_size(id_node->components) > 0;
+                       return BLI_ghash_len(id_node->components) > 0;
                }
                case DEG_NODE_TYPE_PARAMETERS:
                case DEG_NODE_TYPE_ANIMATION:
index 0448dbe2c8d708d14fd3896d396f51a808efb9e5..a6bdcdca19d191c9e564441c3c64c1f89cfc2e81 100644 (file)
@@ -155,5 +155,5 @@ void DEG_evaluate_on_framechange(EvaluationContext *eval_ctx,
 bool DEG_needs_eval(Depsgraph *graph)
 {
        DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
-       return BLI_gset_size(deg_graph->entry_tags) != 0;
+       return BLI_gset_len(deg_graph->entry_tags) != 0;
 }
index c29a0708cef949ff02303469b0861d2e64bbeeb4..8ee66eddad651b94977d60b10a89fd60589f8544 100644 (file)
@@ -253,7 +253,7 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
                              const unsigned int layers)
 {
        /* Nothing to update, early out. */
-       if (BLI_gset_size(graph->entry_tags) == 0) {
+       if (BLI_gset_len(graph->entry_tags) == 0) {
                return;
        }
        DEG_DEBUG_PRINTF("%s: layers:%u, graph->layers:%u\n",
index daf008ddb7dc63344e25a1365022edc45f23a0b0..4033e1325e6400aa6f3a780017cd62587ebe8a06 100644 (file)
@@ -264,7 +264,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
        BLI_assert(bmain != NULL);
        BLI_assert(graph != NULL);
        /* Nothing to update, early out. */
-       if (BLI_gset_size(graph->entry_tags) == 0) {
+       if (BLI_gset_len(graph->entry_tags) == 0) {
                return;
        }
        /* Reset all flags, get ready for the flush. */
index 9450ed7f17d78360f0e49038973a186ba5de9a33..8ebf7424c42d4d34815877d893ef31223d258571 100644 (file)
@@ -305,7 +305,7 @@ OperationDepsNode *ComponentDepsNode::get_entry_operation()
        if (entry_operation) {
                return entry_operation;
        }
-       else if (operations_map != NULL && BLI_ghash_size(operations_map) == 1) {
+       else if (operations_map != NULL && BLI_ghash_len(operations_map) == 1) {
                OperationDepsNode *op_node = NULL;
                /* TODO(sergey): This is somewhat slow. */
                GHASH_FOREACH_BEGIN(OperationDepsNode *, tmp, operations_map)
@@ -328,7 +328,7 @@ OperationDepsNode *ComponentDepsNode::get_exit_operation()
        if (exit_operation) {
                return exit_operation;
        }
-       else if (operations_map != NULL && BLI_ghash_size(operations_map) == 1) {
+       else if (operations_map != NULL && BLI_ghash_len(operations_map) == 1) {
                OperationDepsNode *op_node = NULL;
                /* TODO(sergey): This is somewhat slow. */
                GHASH_FOREACH_BEGIN(OperationDepsNode *, tmp, operations_map)
@@ -348,7 +348,7 @@ OperationDepsNode *ComponentDepsNode::get_exit_operation()
 
 void ComponentDepsNode::finalize_build()
 {
-       operations.reserve(BLI_ghash_size(operations_map));
+       operations.reserve(BLI_ghash_len(operations_map));
        GHASH_FOREACH_BEGIN(OperationDepsNode *, op_node, operations_map)
        {
                operations.push_back(op_node);
index bba486bc65c04d9994acc934261773e788b4e627..86d5f75888d8409b499b390b469cdd1ab09029e7 100644 (file)
@@ -172,7 +172,7 @@ const char *BIF_listTemplates(const bContext *UNUSED(C))
        GHashIterator ghi;
        const char *menu_header = IFACE_("Template %t|None %x0|");
        char *p;
-       const size_t template_size = (BLI_ghash_size(TEMPLATES_HASH) * 32 + 30);
+       const size_t template_size = (BLI_ghash_len(TEMPLATES_HASH) * 32 + 30);
 
        if (TEMPLATES_MENU != NULL) {
                MEM_freeN(TEMPLATES_MENU);
index 2bcf3099104097481266a3a8e4fec4c17d280767..63a255806b819fce713dd1bcc58c77ae830f678a 100644 (file)
@@ -546,7 +546,7 @@ void verifyFaces(ReebGraph *rg)
        int total = 0;
        ReebArc *arc = NULL;
        for (arc = rg->arcs.first; arc; arc = arc->next) {
-               total += BLI_ghash_size(arc->faces);
+               total += BLI_ghash_len(arc->faces);
        }
        
 #endif
@@ -1656,7 +1656,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
                {
                        GHashIterator ghi;
                        int merging = 0;
-                       int total = BLI_ghash_size(arc->faces);
+                       int total = BLI_ghash_len(arc->faces);
                        float avg_angle = 0;
                        float avg_vec[3] = {0, 0, 0};
                        
@@ -1932,7 +1932,7 @@ void REEB_exportGraph(ReebGraph *rg, int count)
                add_v3_v3v3(p, arc->tail->p, arc->head->p);
                mul_v3_fl(p, 0.5f);
                
-               fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_size(arc->faces));
+               fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_len(arc->faces));
                exportNode(f, "v2", arc->tail);
        }
        
@@ -2678,7 +2678,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
                eed->f1 = 0;
        }
        
-       while (BLI_heap_size(edge_heap) > 0) {
+       while (BLI_heap_len(edge_heap) > 0) {
                float current_weight;
                
                current_eve->f1 = 1; /* mark vertex as selected */
@@ -2695,7 +2695,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
                /* Find next shortest edge with unselected verts */
                do {
                        current_weight = BLI_heap_node_value(BLI_heap_top(edge_heap));
-                       select_eed = BLI_heap_popmin(edge_heap);
+                       select_eed = BLI_heap_pop_min(edge_heap);
                } while (select_eed != NULL && select_eed->v1->f1 != 0 && select_eed->v2->f1);
                
                if (select_eed != NULL) {
index f4ee05636c7bfc62cf516b020e121ae492a46fe5..6e059342a6b8efcba26ea5bd32432e3b84899745 100644 (file)
@@ -527,7 +527,7 @@ static GHash *dupli_keyIndexHash(GHash *keyindex)
        GHash *gh;
        GHashIterator gh_iter;
 
-       gh = BLI_ghash_ptr_new_ex("dupli_keyIndex gh", BLI_ghash_size(keyindex));
+       gh = BLI_ghash_ptr_new_ex("dupli_keyIndex gh", BLI_ghash_len(keyindex));
 
        GHASH_ITER (gh_iter, keyindex) {
                void *cv = BLI_ghashIterator_getKey(&gh_iter);
index 4602945d11ce3ee33fc4e69c8e806a17c1cb9f86..5bba21f625266c7e422412e31603c271b56fa2df 100644 (file)
@@ -359,7 +359,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
        wmOperator *op = arg;
        struct CurveDrawData *cdd = op->customdata;
 
-       const int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+       const int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
 
        if (stroke_len == 0) {
                return;
@@ -677,7 +677,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
        if (!RNA_property_is_set(op->ptr, prop)) {
                bool use_cyclic = false;
 
-               if (BLI_mempool_count(cdd->stroke_elem_pool) > 2) {
+               if (BLI_mempool_len(cdd->stroke_elem_pool) > 2) {
                        BLI_mempool_iter iter;
                        const struct StrokeElem *selem, *selem_first, *selem_last;
 
@@ -703,7 +703,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
            (cps->radius_taper_end   != 0.0f))
        {
                /* note, we could try to de-duplicate the length calculations above */
-               const int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+               const int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
 
                BLI_mempool_iter iter;
                struct StrokeElem *selem, *selem_prev;
@@ -763,14 +763,14 @@ static int curve_draw_exec(bContext *C, wmOperator *op)
        Curve *cu = obedit->data;
        ListBase *nurblist = object_editcurve_get(obedit);
 
-       int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+       int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
 
        const bool is_3d = (cu->flag & CU_3D) != 0;
        invert_m4_m4(obedit->imat, obedit->obmat);
 
-       if (BLI_mempool_count(cdd->stroke_elem_pool) == 0) {
+       if (BLI_mempool_len(cdd->stroke_elem_pool) == 0) {
                curve_draw_stroke_from_operator(op);
-               stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+               stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
        }
 
        ED_curve_deselect_all(cu->editnurb);
index 02b8970731c3e2f7eb25554171d017a593fc8c04..4a4b13d0d1b6225d6c1943c8bd0b9066884ffb4c 100644 (file)
@@ -1607,7 +1607,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst
                int axis, sign;
                int u, v;
 
-               vert_curr = *((int *)BLI_heap_popmin(heap));
+               vert_curr = *((int *)BLI_heap_pop_min(heap));
                if (vert_curr == vert_dst) {
                        break;
                }
index 658f8b3958b16cd0c7c3f78ebac0e60901db327d..76a0d874a0b3fdb91479fdb61f2b68fbb2622a14 100644 (file)
@@ -2284,7 +2284,7 @@ static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfe
        /* point to knife edges we've created edges in, edge_array aligned */
        KnifeEdge **kfe_array = BLI_array_alloca(kfe_array, edge_array_len);
 
-       BLI_assert(BLI_gset_size(kcd->edgenet.edge_visit) == 0);
+       BLI_assert(BLI_gset_len(kcd->edgenet.edge_visit) == 0);
 
        i = 0;
        for (ref = kfedges->first; ref; ref = ref->next) {
index abc4b28ee50f5ea6bcba6f1d7ebdf728060843cf..5ef9d4a64999d6b4fa0ebe7cd4efb4f6a542d1b4 100644 (file)
@@ -759,7 +759,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
                MEM_freeN(uniqueUv);
 
                /* Allocate connectivity data, we allocate edges once */
-               data->uvedges = MEM_mallocN(sizeof(*data->uvedges) * BLI_ghash_size(edgeHash), "uv_brush_edge_connectivity_data");
+               data->uvedges = MEM_mallocN(sizeof(*data->uvedges) * BLI_ghash_len(edgeHash), "uv_brush_edge_connectivity_data");
                if (!data->uvedges) {
                        BLI_ghash_free(edgeHash, NULL, NULL);
                        MEM_freeN(edges);
@@ -772,7 +772,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
                GHASH_ITER (gh_iter, edgeHash) {
                        data->uvedges[i++] = *((UvEdge *)BLI_ghashIterator_getKey(&gh_iter));
                }
-               data->totalUvEdges = BLI_ghash_size(edgeHash);
+               data->totalUvEdges = BLI_ghash_len(edgeHash);
 
                /* cleanup temporary stuff */
                BLI_ghash_free(edgeHash, NULL, NULL);
index cf77afa32c40d5238ec32f1205f2a645ac745420..051605b10796c00955f894ad3ab6c4bd02483f84 100644 (file)
@@ -113,7 +113,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
                        }
                        
                        if (unused) {
-                               if (BLI_mempool_count(ts) == unused) {
+                               if (BLI_mempool_len(ts) == unused) {
                                        BLI_mempool_destroy(ts);
                                        soops->treestore = NULL;
                                        if (soops->treehash) {
@@ -123,7 +123,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
                                }
                                else {
                                        TreeStoreElem *tsenew;
-                                       BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_count(ts) - unused,
+                                       BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_len(ts) - unused,
                                                                                 512, BLI_MEMPOOL_ALLOW_ITER);
                                        BLI_mempool_iternew(ts, &iter);
                                        while ((tselem = BLI_mempool_iterstep(&iter))) {
@@ -1635,7 +1635,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
        Base *base;
        TreeElement *te = NULL, *ten;
        TreeStoreElem *tselem;
-       int show_opened = !soops->treestore || !BLI_mempool_count(soops->treestore); /* on first view, we open scenes */
+       int show_opened = !soops->treestore || !BLI_mempool_len(soops->treestore); /* on first view, we open scenes */
 
        /* Are we looking for something - we want to tag parents to filter child matches
         * - NOT in datablocks view - searching all datablocks takes way too long to be useful
index 2a3a2b842230cd51b3f73c79d5dcf290f94a6f00..f8a93bd2ce3b292ba587bb9da06b1f77e2adecdb 100644 (file)
@@ -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;
 
index c2a38a906218eecf1a13a05bc3372209762dc83b..da36170310a79f145ba73da444015750a5f72537 100644 (file)
@@ -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 */
index d6e01b6765ad6de228edffd7568d277759345400..ea8f75167264b385f448dc28ea49886bd0ca5a6c 100644 (file)
@@ -2009,7 +2009,7 @@ bool GPU_pbvh_buffers_diffuse_changed(
        }
        else if (buffers->use_bmesh) {
                /* due to dynamic nature of dyntopo, only get first material */
-               if (BLI_gset_size(bm_faces) > 0) {
+               if (BLI_gset_len(bm_faces) > 0) {
                        GSetIterator gs_iter;
                        BMFace *f;
 
index 89955711384db49ac650ae0c7a25977027f9206f..daf062f5499a9bce4c0d5e045c1abeffec1e5b6a 100644 (file)
@@ -513,7 +513,7 @@ void IMB_moviecache_get_cache_segments(MovieCache *cache, int proxy, int render_
                *points_r = cache->points;
        }
        else {
-               int totframe = BLI_ghash_size(cache->hash);
+               int totframe = BLI_ghash_len(cache->hash);
                int *frames = MEM_callocN(totframe * sizeof(int), "movieclip cache frames");
                int a, totseg = 0;
                GHashIterator gh_iter;
index 62da8b8ffeaacc75941d86ec1ccd34275b91e980..f71d14efb2bfaf245c751f0e1fad38ae0e231891 100644 (file)
@@ -154,7 +154,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
 
                        numLoops_dst += mp->totloop;
                }
-               BLI_assert(hash_num == BLI_ghash_size(vertHash));
+               BLI_assert(hash_num == BLI_ghash_len(vertHash));
 
                /* get the set of edges that will be in the new mesh (i.e. all edges
                 * that have both verts in the new mesh)
@@ -187,7 +187,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
                 */
                medge = medge_src;
                hash_num = 0;
-               BLI_assert(hash_num == BLI_ghash_size(vertHash));
+               BLI_assert(hash_num == BLI_ghash_len(vertHash));
                for (i = 0; i < numEdges_dst; i++) {
                        void **val_p;
                        me = medge + edgeMap[i];
@@ -201,11 +201,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
                                hash_num++;
                        }
                }
-               BLI_assert(hash_num == BLI_ghash_size(vertHash));
+               BLI_assert(hash_num == BLI_ghash_len(vertHash));
 
                /* get the set of edges that will be in the new mesh */
                for (i = 0; i < numEdges_dst; i++) {
-                       j = BLI_ghash_size(edgeHash);
+                       j = BLI_ghash_len(edgeHash);
                        
                        BLI_ghash_insert(edgeHash, SET_INT_IN_POINTER(j),
                                         SET_INT_IN_POINTER(edgeMap[i]));
@@ -232,8 +232,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
        /* now we know the number of verts, edges and faces, we can create
         * the mesh
         */
-       result = CDDM_from_template(dm, BLI_ghash_size(vertHash),
-                                   BLI_ghash_size(edgeHash), 0, numLoops_dst, numFaces_dst);
+       result = CDDM_from_template(dm, BLI_ghash_len(vertHash),
+                                   BLI_ghash_len(edgeHash), 0, numLoops_dst, numFaces_dst);
 
        /* copy the vertices across */
        GHASH_ITER (gh_iter, vertHash) {
@@ -250,7 +250,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
        }
        
        /* copy the edges across, remapping indices */
-       for (i = 0; i < BLI_ghash_size(edgeHash); i++) {
+       for (i = 0; i < BLI_ghash_len(edgeHash); i++) {
                MEdge source;
                MEdge *dest;
                int oldIndex = GET_INT_FROM_POINTER(BLI_ghash_lookup(edgeHash, SET_INT_IN_POINTER(i)));
index 6006b48628037f90ab77b1a93319ad13214cb1dc..5a13f92f237b134765f89d4a9604a57e40d9fc0e 100644 (file)
@@ -1470,7 +1470,7 @@ static void hull_merge_triangles(SkinOutput *so, const SkinModifierData *smd)
        while (!BLI_heap_is_empty(heap)) {
                BMFace *adj[2];
 
-               e = BLI_heap_popmin(heap);
+               e = BLI_heap_pop_min(heap);
 
                if (BM_edge_face_pair(e, &adj[0], &adj[1])) {
                        /* If both triangles still free, and if they don't already
index 6598d402f7268edd2e2ed68a1e1e48caaffd5c9c..4dce0dc2a22a8da3a3e6ee3b015dcf3da923b88f 100644 (file)
@@ -566,7 +566,7 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
                        switch (slot->slot_subtype.map) {
                                case BMO_OP_SLOT_SUBTYPE_MAP_ELEM:
                                {
-                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_size(slot_hash) : 0);
+                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_len(slot_hash) : 0);
                                        if (slot_hash) {
                                                GHASH_ITER (hash_iter, slot_hash) {
                                                        BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
@@ -584,7 +584,7 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
                                }
                                case BMO_OP_SLOT_SUBTYPE_MAP_FLT:
                                {
-                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_size(slot_hash) : 0);
+                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_len(slot_hash) : 0);
                                        if (slot_hash) {
                                                GHASH_ITER (hash_iter, slot_hash) {
                                                        BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
@@ -602,7 +602,7 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
                                }
                                case BMO_OP_SLOT_SUBTYPE_MAP_INT:
                                {
-                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_size(slot_hash) : 0);
+                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_len(slot_hash) : 0);
                                        if (slot_hash) {
                                                GHASH_ITER (hash_iter, slot_hash) {
                                                        BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
@@ -620,7 +620,7 @@ static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
                                }
                                case BMO_OP_SLOT_SUBTYPE_MAP_BOOL:
                                {
-                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_size(slot_hash) : 0);
+                                       item = _PyDict_NewPresized(slot_hash ? BLI_ghash_len(slot_hash) : 0);
                                        if (slot_hash) {
                                                GHASH_ITER (hash_iter, slot_hash) {
                                                        BMHeader *ele_key = BLI_ghashIterator_getKey(&hash_iter);
index 5b84a7cf73c41eddf3ffb6a97ff6b2ec5e0bdabb..0cadbc30a9f1c259b24759413c5ef74dc9bcd55a 100644 (file)
@@ -384,7 +384,7 @@ static PyObject *pyop_dir(PyObject *UNUSED(self))
        int i;
 
        WM_operatortype_iter(&iter);
-       list = PyList_New(BLI_ghash_size(iter.gh));
+       list = PyList_New(BLI_ghash_len(iter.gh));
 
        for (i = 0; !BLI_ghashIterator_done(&iter); BLI_ghashIterator_step(&iter), i++) {
                wmOperatorType *ot = BLI_ghashIterator_getValue(&iter);
index a197d0813e7768616ecb7cbb572412386545c37f..87260d6e786e13387d709a59b8543c34a8b999d0 100644 (file)
@@ -223,7 +223,7 @@ static PyObject *id_free_weakref_cb(PyObject *weakinfo_capsule, PyObject *weakre
        GHash *weakinfo_hash = PyCapsule_GetPointer(weakinfo_capsule, NULL);
 
 
-       if (BLI_ghash_size(weakinfo_hash) > 1) {
+       if (BLI_ghash_len(weakinfo_hash) > 1) {
                BLI_ghash_remove(weakinfo_hash, weakref, NULL, NULL);
        }
        else { /* get the last id and free it */
@@ -243,7 +243,7 @@ static void id_release_weakref_list(struct ID *id, GHash *weakinfo_hash)
        BLI_ghashIterator_init(&weakinfo_hash_iter, weakinfo_hash);
 
 #ifdef DEBUG_RNA_WEAKREF
-       fprintf(stdout, "id_release_weakref: '%s', %d items\n", id->name, BLI_ghash_size(weakinfo_hash));
+       fprintf(stdout, "id_release_weakref: '%s', %d items\n", id->name, BLI_ghash_len(weakinfo_hash));
 #endif
 
        while (!BLI_ghashIterator_done(&weakinfo_hash_iter)) {
@@ -266,7 +266,7 @@ static void id_release_weakref_list(struct ID *id, GHash *weakinfo_hash)
        BLI_ghash_remove(id_weakref_pool, (void *)id, NULL, NULL);
        BLI_ghash_free(weakinfo_hash, NULL, NULL);
 
-       if (BLI_ghash_size(id_weakref_pool) == 0) {
+       if (BLI_ghash_len(id_weakref_pool) == 0) {
                BLI_ghash_free(id_weakref_pool, NULL, NULL);
                id_weakref_pool = NULL;
 #ifdef DEBUG_RNA_WEAKREF
index 924c84d72d0ca3b26b7e44859fdf5928164f6eff..0eca99ae5421630e14dbdc5ea0012e26b2ac6e24 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
        printf("GHash stats (%u entries):\n\t" \
               "Quality (the lower the better): %f\n\tVariance (the lower the better): %f\n\tLoad: %f\n\t" \
               "Empty buckets: %.2f%%\n\tOverloaded buckets: %.2f%% (biggest bucket: %d)\n", \
-              BLI_ghash_size(_gh), q, var, lf, pempty * 100.0, poverloaded * 100.0, bigb); \
+              BLI_ghash_len(_gh), q, var, lf, pempty * 100.0, poverloaded * 100.0, bigb); \
 } void (0)
 
 /* Str: whole text, lines and words from a 'corpus' text. */
@@ -214,7 +214,7 @@ static void int_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr
 
                TIMEIT_END(int_pop);
        }
-       EXPECT_EQ(BLI_ghash_size(ghash), 0);
+       EXPECT_EQ(BLI_ghash_len(ghash), 0);
 
        BLI_ghash_free(ghash, NULL, NULL);
 
index 6d075e29114ae3433160850aed4bab506f3777af..f73a13ce05a87c89298d1668894cd87bceae3bae 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
        printf("GHash stats (%d entries):\n\t" \
               "Quality (the lower the better): %f\n\tVariance (the lower the better): %f\n\tLoad: %f\n\t" \
               "Empty buckets: %.2f%%\n\tOverloaded buckets: %.2f%% (biggest bucket: %d)\n", \
-              BLI_ghash_size(_gh), q, var, lf, pempty * 100.0, poverloaded * 100.0, bigb); \
+              BLI_ghash_len(_gh), q, var, lf, pempty * 100.0, poverloaded * 100.0, bigb); \
 } void (0)
 
 /* Note: for pure-ghash testing, nature of the keys and data have absolutely no importance! So here we just use mere
@@ -62,7 +62,7 @@ TEST(ghash, InsertLookup)
                BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), TESTCASE_SIZE);
+       EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
 
        for (i = TESTCASE_SIZE, k = keys; i--; k++) {
                void *v = BLI_ghash_lookup(ghash, SET_UINT_IN_POINTER(*k));
@@ -85,16 +85,16 @@ TEST(ghash, InsertRemove)
                BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), TESTCASE_SIZE);
-       bkt_size = BLI_ghash_buckets_size(ghash);
+       EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
+       bkt_size = BLI_ghash_buckets_len(ghash);
 
        for (i = TESTCASE_SIZE, k = keys; i--; k++) {
                void *v = BLI_ghash_popkey(ghash, SET_UINT_IN_POINTER(*k), NULL);
                EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), 0);
-       EXPECT_EQ(BLI_ghash_buckets_size(ghash), bkt_size);
+       EXPECT_EQ(BLI_ghash_len(ghash), 0);
+       EXPECT_EQ(BLI_ghash_buckets_len(ghash), bkt_size);
 
        BLI_ghash_free(ghash, NULL, NULL);
 }
@@ -113,16 +113,16 @@ TEST(ghash, InsertRemoveShrink)
                BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), TESTCASE_SIZE);
-       bkt_size = BLI_ghash_buckets_size(ghash);
+       EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
+       bkt_size = BLI_ghash_buckets_len(ghash);
 
        for (i = TESTCASE_SIZE, k = keys; i--; k++) {
                void *v = BLI_ghash_popkey(ghash, SET_UINT_IN_POINTER(*k), NULL);
                EXPECT_EQ(GET_UINT_FROM_POINTER(v), *k);
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), 0);
-       EXPECT_LT(BLI_ghash_buckets_size(ghash), bkt_size);
+       EXPECT_EQ(BLI_ghash_len(ghash), 0);
+       EXPECT_LT(BLI_ghash_buckets_len(ghash), bkt_size);
 
        BLI_ghash_free(ghash, NULL, NULL);
 }
@@ -141,12 +141,12 @@ TEST(ghash, Copy)
                BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), TESTCASE_SIZE);
+       EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
 
        ghash_copy = BLI_ghash_copy(ghash, NULL, NULL);
 
-       EXPECT_EQ(BLI_ghash_size(ghash_copy), TESTCASE_SIZE);
-       EXPECT_EQ(BLI_ghash_buckets_size(ghash_copy), BLI_ghash_buckets_size(ghash));
+       EXPECT_EQ(BLI_ghash_len(ghash_copy), TESTCASE_SIZE);
+       EXPECT_EQ(BLI_ghash_buckets_len(ghash_copy), BLI_ghash_buckets_len(ghash));
 
        for (i = TESTCASE_SIZE, k = keys; i--; k++) {
                void *v = BLI_ghash_lookup(ghash_copy, SET_UINT_IN_POINTER(*k));
@@ -171,7 +171,7 @@ TEST(ghash, Pop)
                BLI_ghash_insert(ghash, SET_UINT_IN_POINTER(*k), SET_UINT_IN_POINTER(*k));
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), TESTCASE_SIZE);
+       EXPECT_EQ(BLI_ghash_len(ghash), TESTCASE_SIZE);
 
        GHashIterState pop_state = {0};
 
@@ -186,7 +186,7 @@ TEST(ghash, Pop)
                }
        }
 
-       EXPECT_EQ(BLI_ghash_size(ghash), (TESTCASE_SIZE - TESTCASE_SIZE / 2 + TESTCASE_SIZE / 4));
+       EXPECT_EQ(BLI_ghash_len(ghash), (TESTCASE_SIZE - TESTCASE_SIZE / 2 + TESTCASE_SIZE / 4));
 
        {
                void *k, *v;
@@ -194,7 +194,7 @@ TEST(ghash, Pop)
                        EXPECT_EQ(k, v);
                }
        }
-       EXPECT_EQ(BLI_ghash_size(ghash), 0);
+       EXPECT_EQ(BLI_ghash_len(ghash), 0);
 
        BLI_ghash_free(ghash, NULL, NULL);
 }
index 89e271d516731bdc6c393418ef2ef91ebc2447a4..82acdabd7eb3a1c20eb78b50e3c5b09cb1762681 100644 (file)
@@ -30,7 +30,7 @@ TEST(heap, Empty)
 
        heap = BLI_heap_new();
        EXPECT_TRUE(BLI_heap_is_empty(heap));
-       EXPECT_EQ(BLI_heap_size(heap), 0);
+       EXPECT_EQ(BLI_heap_len(heap), 0);
        BLI_heap_free(heap, NULL);
 }
 
@@ -43,10 +43,10 @@ TEST(heap, One)
  
        BLI_heap_insert(heap, 0.0f, (void *)in);
        EXPECT_FALSE(BLI_heap_is_empty(heap));
-       EXPECT_EQ(BLI_heap_size(heap), 1);
-       EXPECT_EQ(in, BLI_heap_popmin(heap));
+       EXPECT_EQ(BLI_heap_len(heap), 1);
+       EXPECT_EQ(in, BLI_heap_pop_min(heap));
        EXPECT_TRUE(BLI_heap_is_empty(heap));
-       EXPECT_EQ(BLI_heap_size(heap), 0);
+       EXPECT_EQ(BLI_heap_len(heap), 0);
        BLI_heap_free(heap, NULL);
 }
 
@@ -58,7 +58,7 @@ TEST(heap, Range)
                BLI_heap_insert(heap, (float)in, SET_INT_IN_POINTER(in));
        }
        for (int out_test = 0; out_test < items_total; out_test++) {
-               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
 
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
@@ -73,7 +73,7 @@ TEST(heap, RangeReverse)
                BLI_heap_insert(heap, (float)-in, SET_INT_IN_POINTER(-in));
        }
        for (int out_test = items_total - 1; out_test >= 0; out_test--) {
-               EXPECT_EQ(-out_test, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(-out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
        BLI_heap_free(heap, NULL);
@@ -92,7 +92,7 @@ TEST(heap, RangeRemove)
                nodes[i] = NULL;
        }
        for (int out_test = 1; out_test < items_total; out_test += 2) {
-               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
        BLI_heap_free(heap, NULL);
@@ -107,7 +107,7 @@ TEST(heap, Duplicates)
                BLI_heap_insert(heap, 1.0f, 0);
        }
        for (int out_test = 0; out_test < items_total; out_test++) {
-               EXPECT_EQ(0, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(0, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
        BLI_heap_free(heap, NULL);
@@ -125,7 +125,7 @@ static void random_heap_helper(
                BLI_heap_insert(heap, values[i], SET_INT_IN_POINTER((int)values[i]));
        }
        for (int out_test = 0; out_test < items_total; out_test++) {
-               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
        BLI_heap_free(heap, NULL);
@@ -150,7 +150,7 @@ TEST(heap, ReInsertSimple)
        }
 
        for (int out_test = 0; out_test < items_total; out_test++) {
-               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_popmin(heap)));
+               EXPECT_EQ(out_test, GET_INT_FROM_POINTER(BLI_heap_pop_min(heap)));
        }
 
        EXPECT_TRUE(BLI_heap_is_empty(heap));
@@ -177,7 +177,7 @@ static void random_heap_reinsert_helper(
                HeapNode *node_top = BLI_heap_top(heap);
                float out = BLI_heap_node_value(node_top);
                EXPECT_EQ((float)out_test, out);
-               BLI_heap_popmin(heap);
+               BLI_heap_pop_min(heap);
        }
        EXPECT_TRUE(BLI_heap_is_empty(heap));
        BLI_heap_free(heap, NULL);
index 74db7cf20a018cf181df4dc067655f373de44eea..48f4d7054da9de98c45826a958e7196406e84283 100644 (file)
@@ -34,7 +34,7 @@ TEST(kdopbvh, Empty)
 {
        BVHTree *tree = BLI_bvhtree_new(0, 0.0, 8, 8);
        BLI_bvhtree_balance(tree);
-       EXPECT_EQ(0, BLI_bvhtree_get_size(tree));
+       EXPECT_EQ(0, BLI_bvhtree_get_len(tree));
        BLI_bvhtree_free(tree);
 }
 
@@ -46,7 +46,7 @@ TEST(kdopbvh, Single)
                BLI_bvhtree_insert(tree, 0, co, 1);
        }
 
-       EXPECT_EQ(BLI_bvhtree_get_size(tree), 1);
+       EXPECT_EQ(BLI_bvhtree_get_len(tree), 1);
 
        BLI_bvhtree_balance(tree);
        BLI_bvhtree_free(tree);
index a58116c7b85dd627e3dbfc55a8618d3c2f947291..01ab400b5b7fd0ca68ae6f39b1bce76d3971fe83 100644 (file)
@@ -101,7 +101,7 @@ static void  test_polyfill_topology(
                        }
                }
        }
-       EXPECT_EQ(BLI_edgehash_size(edgehash), poly_tot + (poly_tot - 3));
+       EXPECT_EQ(BLI_edgehash_len(edgehash), poly_tot + (poly_tot - 3));
 
        for (i = 0; i < poly_tot; i++) {
                const unsigned int v1 = i;