forked from bartvdbraak/blender
GHash: use reinsert instead of remove/insert
This commit is contained in:
parent
9fadacfd0f
commit
4305950fc0
@ -172,8 +172,7 @@ void tracks_map_merge(TracksMap *map, MovieTracking *tracking)
|
||||
MovieTrackingTrack *new_track = BKE_tracking_track_duplicate(track);
|
||||
|
||||
/* Update old-new track mapping */
|
||||
BLI_ghash_remove(map->hash, track, NULL, NULL);
|
||||
BLI_ghash_insert(map->hash, track, new_track);
|
||||
BLI_ghash_reinsert(map->hash, track, new_track, NULL, NULL);
|
||||
|
||||
BLI_addtail(&tracks, new_track);
|
||||
}
|
||||
|
@ -363,8 +363,7 @@ static void do_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf, boo
|
||||
item->priority_data = cache->getprioritydatafp(userkey);
|
||||
}
|
||||
|
||||
BLI_ghash_remove(cache->hash, key, moviecache_keyfree, moviecache_valfree);
|
||||
BLI_ghash_insert(cache->hash, key, item);
|
||||
BLI_ghash_reinsert(cache->hash, key, item, moviecache_keyfree, moviecache_valfree);
|
||||
|
||||
if (cache->last_userkey) {
|
||||
memcpy(cache->last_userkey, userkey, cache->keysize);
|
||||
|
Loading…
Reference in New Issue
Block a user