Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-14 11:37:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-14 12:43:19 +0300
commit7dfc1ad6c15522a3b7ddfd410198a32ba946d89e (patch)
tree4ac108ea26f7bb12796800cd7a21f9f1461f9413
parent87e05c152a5e8747949952901890147603ce89b6 (diff)
Tracking: Correct comparison in cache keys
This code wasn't uses, but the key comparison was totally wrong.
-rw-r--r--source/blender/blenkernel/intern/tracking_util.c26
1 files changed, 9 insertions, 17 deletions
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,