[Bf-blender-cvs] [17b4f57] master: Missed this last commit (dyntopo hashing)
Campbell Barton
noreply at git.blender.org
Sun Apr 12 03:13:53 CEST 2015
Commit: 17b4f57bf0ec8beb956198654589d49e261b7f97
Author: Campbell Barton
Date: Sun Apr 12 11:12:16 2015 +1000
Branches: master
https://developer.blender.org/rB17b4f57bf0ec8beb956198654589d49e261b7f97
Missed this last commit (dyntopo hashing)
===================================================================
M source/blender/bmesh/intern/bmesh_log.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 25ddb9e..8596fcb 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);
More information about the Bf-blender-cvs
mailing list