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:
authorNicholas Bishop <nicholasbishop@gmail.com>2012-05-16 04:51:36 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2012-05-16 04:51:36 +0400
commited33320e3f149f4106ed70b82d019113970c991e (patch)
tree49aaa5a8f7e53e7065fb758c86c73eddc20d3b9f /source/blender/bmesh/intern/bmesh_walkers.c
parenteb22b5248229494bcab091e68cf7a354fe0cc0e3 (diff)
Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the standard ptr/str/int/pair hash and compare functions. GHash *BLI_ghash_ptr_new(const char *info); GHash *BLI_ghash_str_new(const char *info); GHash *BLI_ghash_int_new(const char *info); GHash *BLI_ghash_pair_new(const char *info); Replaced almost all occurrences of BLI_ghash_new() with one of the above functions.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_walkers.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index ea29c149c1a..79e097a7a7c 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -87,8 +87,8 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type,
walker->mask_edge = mask_edge;
walker->mask_face = mask_face;
- walker->visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers 1");
- walker->secvisithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers sec 1");
+ walker->visithash = BLI_ghash_ptr_new("bmesh walkers 1");
+ walker->secvisithash = BLI_ghash_ptr_new("bmesh walkers sec 1");
if (UNLIKELY(type >= BMW_MAXWALKERS || type < 0)) {
fprintf(stderr,
@@ -254,6 +254,6 @@ void BMW_reset(BMWalker *walker)
walker->depth = 0;
BLI_ghash_free(walker->visithash, NULL, NULL);
BLI_ghash_free(walker->secvisithash, NULL, NULL);
- walker->visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers 1");
- walker->secvisithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers sec 1");
+ walker->visithash = BLI_ghash_ptr_new("bmesh walkers 1");
+ walker->secvisithash = BLI_ghash_ptr_new("bmesh walkers sec 1");
}