From 7cc206ddca5fd240f87210d6dfb311c81ca4ac65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 29 Feb 2012 15:00:37 +0000 Subject: Code Cleanup: remove non existing function declarations. added some missing functions too - which are not used yep but should be there for api completeness. * CDDM_set_mloop * CDDM_set_mpoly * BLI_mempool_count --- source/blender/blenlib/BLI_dlrbTree.h | 2 +- source/blender/blenlib/BLI_graph.h | 1 - source/blender/blenlib/BLI_mempool.h | 18 +++++++----------- source/blender/blenlib/intern/BLI_mempool.c | 5 +++++ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_dlrbTree.h b/source/blender/blenlib/BLI_dlrbTree.h index bad74a1e5a8..f048e319d5d 100644 --- a/source/blender/blenlib/BLI_dlrbTree.h +++ b/source/blender/blenlib/BLI_dlrbTree.h @@ -142,7 +142,7 @@ DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, /* Remove the given element from the tree and balance again */ // FIXME: this is not implemented yet... -void BLI_dlrbTree_remove(DLRBT_Tree *tree, DLRBT_Node *node); +// void BLI_dlrbTree_remove(DLRBT_Tree *tree, DLRBT_Node *node); /* Node Operations (Manual) --------------------- */ /* These methods require custom code for creating BST nodes and adding them to the diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h index 5995daebc61..effa2c3bc03 100644 --- a/source/blender/blenlib/BLI_graph.h +++ b/source/blender/blenlib/BLI_graph.h @@ -141,7 +141,6 @@ void BLI_flagArcs(BGraph *graph, int flag); int BLI_hasAdjacencyList(BGraph *rg); void BLI_buildAdjacencyList(BGraph *rg); -void BLI_rebuildAdjacencyList(BGraph* rg); void BLI_rebuildAdjacencyListForNode(BGraph* rg, BNode *node); void BLI_freeAdjacencyList(BGraph *rg); diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index d80d46e9ae5..0b190c63559 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -44,17 +44,17 @@ struct BLI_mempool_chunk; typedef struct BLI_mempool BLI_mempool; -/*allow_iter allows iteration on this mempool. note: this requires that the - first four bytes of the elements never contain the character string - 'free'. use with care.*/ +/* allow_iter allows iteration on this mempool. note: this requires that the + * first four bytes of the elements never contain the character string + * 'free'. use with care.*/ BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, short use_sysmalloc, short allow_iter); void *BLI_mempool_alloc(BLI_mempool *pool); void *BLI_mempool_calloc(BLI_mempool *pool); -void BLI_mempool_free(BLI_mempool *pool, void *addr); -void BLI_mempool_destroy(BLI_mempool *pool); -int BLI_mempool_count(BLI_mempool *pool); +void BLI_mempool_free(BLI_mempool *pool, void *addr); +void BLI_mempool_destroy(BLI_mempool *pool); +int BLI_mempool_count(BLI_mempool *pool); void *BLI_mempool_findelem(BLI_mempool *pool, int index); /** iteration stuff. note: this may easy to produce bugs with **/ @@ -65,11 +65,7 @@ typedef struct BLI_mempool_iter { int curindex; } BLI_mempool_iter; -/*allow iteration on this mempool. note: this requires that the - first four bytes of the elements never contain the character string - 'free'. use with care.*/ -void BLI_mempool_allow_iter(BLI_mempool *pool); -void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter); +void BLI_mempool_iternew(BLI_mempool *pool, BLI_mempool_iter *iter); void *BLI_mempool_iterstep(BLI_mempool_iter *iter); #ifdef __cplusplus diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 6abe6c7c8be..aac36e5b79b 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -241,6 +241,11 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr) } } +int BLI_mempool_count(BLI_mempool *pool) +{ + return pool->totused; +} + void *BLI_mempool_findelem(BLI_mempool *pool, int index) { if (!pool->allow_iter) { -- cgit v1.2.3