diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-16 14:50:11 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-16 14:50:11 +0300 |
commit | 6cd3ebfc9fa4838a74192f2e5cc82b5d5d2e6fe7 (patch) | |
tree | 546c8e187f3b5185f019153ee083fa246b698436 /source/blender/imbuf/intern/moviecache.c | |
parent | 97a50e78ca88b4ffe180bc6567e5ed0358239efe (diff) | |
parent | 5684ad80723454f0d910aad3fa48240da19c4e3b (diff) |
Merge branch 'master' into alembic_pointcache
Conflicts:
release/scripts/addons
source/blender/blenkernel/intern/pointcache.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/intern/rna_modifier.c
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_util.c
Diffstat (limited to 'source/blender/imbuf/intern/moviecache.c')
-rw-r--r-- | source/blender/imbuf/intern/moviecache.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index 1641bd3089b..cb789cc8491 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -99,22 +99,22 @@ typedef struct MovieCacheItem { static unsigned int moviecache_hashhash(const void *keyv) { - MovieCacheKey *key = (MovieCacheKey *)keyv; + const MovieCacheKey *key = keyv; return key->cache_owner->hashfp(key->userkey); } static bool moviecache_hashcmp(const void *av, const void *bv) { - const MovieCacheKey *a = (MovieCacheKey *)av; - const MovieCacheKey *b = (MovieCacheKey *)bv; + const MovieCacheKey *a = av; + const MovieCacheKey *b = bv; return a->cache_owner->cmpfp(a->userkey, b->userkey); } static void moviecache_keyfree(void *val) { - MovieCacheKey *key = (MovieCacheKey *)val; + MovieCacheKey *key = val; BLI_mempool_free(key->cache_owner->userkeys_pool, key->userkey); @@ -167,8 +167,8 @@ static void check_unused_keys(MovieCache *cache) static int compare_int(const void *av, const void *bv) { - const int *a = (int *)av; - const int *b = (int *)bv; + const int *a = av; + const int *b = bv; return *a - *b; } @@ -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); |