diff options
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_log.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index c7be4424a21..b50f35be4f3 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -117,10 +117,8 @@ static void bm_log_vert_id_set(BMLog *log, BMVert *v, unsigned int id) { void *vid = SET_INT_IN_POINTER(id); - BLI_ghash_remove(log->id_to_elem, vid, NULL, NULL); - BLI_ghash_insert(log->id_to_elem, vid, v); - BLI_ghash_remove(log->elem_to_id, v, NULL, NULL); - BLI_ghash_insert(log->elem_to_id, v, vid); + BLI_ghash_assign(log->id_to_elem, vid, v, NULL, NULL); + BLI_ghash_assign(log->elem_to_id, v, vid, NULL, NULL); } /* Get a vertex from its unique ID */ @@ -142,11 +140,9 @@ static unsigned int bm_log_face_id_get(BMLog *log, BMFace *f) static void bm_log_face_id_set(BMLog *log, BMFace *f, unsigned int id) { void *fid = SET_INT_IN_POINTER(id); - - BLI_ghash_remove(log->id_to_elem, fid, NULL, NULL); - BLI_ghash_insert(log->id_to_elem, fid, f); - BLI_ghash_remove(log->elem_to_id, f, NULL, NULL); - BLI_ghash_insert(log->elem_to_id, f, fid); + + BLI_ghash_assign(log->id_to_elem, fid, f, NULL, NULL); + BLI_ghash_assign(log->elem_to_id, f, fid, NULL, NULL); } /* Get a face from its unique ID */ |