From 7dfc1ad6c15522a3b7ddfd410198a32ba946d89e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 14 Aug 2017 10:37:36 +0200 Subject: Tracking: Correct comparison in cache keys This code wasn't uses, but the key comparison was totally wrong. --- source/blender/blenkernel/intern/tracking_util.c | 26 ++++++++---------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'source/blender/blenkernel/intern') diff --git a/source/blender/blenkernel/intern/tracking_util.c b/source/blender/blenkernel/intern/tracking_util.c index fef0a3bc0ac..5a8f3f63f44 100644 --- a/source/blender/blenkernel/intern/tracking_util.c +++ b/source/blender/blenkernel/intern/tracking_util.c @@ -537,23 +537,15 @@ static bool accesscache_hashcmp(const void *a_v, const void *b_v) { const AccessCacheKey *a = (const AccessCacheKey *) a_v; const AccessCacheKey *b = (const AccessCacheKey *) b_v; - -#define COMPARE_FIELD(field) - { \ - if (a->clip_index != b->clip_index) { \ - return false; \ - } \ - } (void) 0 - - COMPARE_FIELD(clip_index); - COMPARE_FIELD(frame); - COMPARE_FIELD(downscale); - COMPARE_FIELD(input_mode); - COMPARE_FIELD(transform_key); - -#undef COMPARE_FIELD - - return true; + if (a->clip_index != b->clip_index || + a->frame != b->frame || + a->downscale != b->downscale || + a->input_mode != b->input_mode || + a->transform_key != b->transform_key) + { + return true; + } + return false; } static void accesscache_put(TrackingImageAccessor *accessor, -- cgit v1.2.3