diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-12 04:12:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-12 04:12:57 +0300 |
commit | 17b4f57bf0ec8beb956198654589d49e261b7f97 (patch) | |
tree | fd3984516a0b79d6f2dc2563b7ed05b23c4149b1 /source/blender/bmesh | |
parent | 87b6d3c7960461249e80c4c8c304cfc968c6586c (diff) |
Missed this last commit (dyntopo hashing)
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_log.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index 25ddb9ea79e..8596fcbf83e 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -480,10 +480,11 @@ static void bm_log_id_ghash_release(BMLog *log, GHash *id_ghash) BMLog *BM_log_create(BMesh *bm) { BMLog *log = MEM_callocN(sizeof(*log), __func__); + const unsigned int reserve_num = (unsigned int)(bm->totvert + bm->totface); log->unused_ids = range_tree_uint_alloc(0, (unsigned)-1); - log->id_to_elem = BLI_ghash_ptr_new_ex(__func__, (unsigned int)(bm->totvert + bm->totface)); - log->elem_to_id = BLI_ghash_ptr_new_ex(__func__, (unsigned int)(bm->totvert + bm->totface)); + log->id_to_elem = BLI_ghash_new_ex(logkey_hash, logkey_cmp, __func__, reserve_num); + log->elem_to_id = BLI_ghash_ptr_new_ex(__func__, reserve_num); /* Assign IDs to all existing vertices and faces */ bm_log_assign_ids(bm, log); |