diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-10-07 19:39:17 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-10-07 19:39:17 +0400 |
commit | 189c2e9277d4abd3b750a5a60ef42549dcfe359d (patch) | |
tree | 1430a845f4aab56b9133c3d8c6ffac09ee6dd92a /source/blender/imbuf/intern/cache.c | |
parent | 771bad9c6abaad4b742935e5d55067f281287650 (diff) | |
parent | 1519b6a23e0341e25bf5a5c714f9f3d119ab8781 (diff) |
Merge branch 'master' into soc-2014-viewport_contextsoc-2014-viewport_context
Diffstat (limited to 'source/blender/imbuf/intern/cache.c')
-rw-r--r-- | source/blender/imbuf/intern/cache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c index 0c17dd21434..677c3dbe700 100644 --- a/source/blender/imbuf/intern/cache.c +++ b/source/blender/imbuf/intern/cache.c @@ -101,14 +101,14 @@ static unsigned int imb_global_tile_hash(const void *gtile_p) return ((unsigned int)(intptr_t)gtile->ibuf) * 769 + gtile->tx * 53 + gtile->ty * 97; } -static int imb_global_tile_cmp(const void *a_p, const void *b_p) +static bool imb_global_tile_cmp(const void *a_p, const void *b_p) { const ImGlobalTile *a = a_p; const ImGlobalTile *b = b_p; - if (a->ibuf == b->ibuf && a->tx == b->tx && a->ty == b->ty) return 0; - else if (a->ibuf < b->ibuf || a->tx < b->tx || a->ty < b->ty) return -1; - else return 1; + return ((a->ibuf != b->ibuf) || + (a->tx != b->tx) || + (a->ty != b->ty)); } static unsigned int imb_thread_tile_hash(const void *ttile_p) @@ -118,14 +118,14 @@ static unsigned int imb_thread_tile_hash(const void *ttile_p) return ((unsigned int)(intptr_t)ttile->ibuf) * 769 + ttile->tx * 53 + ttile->ty * 97; } -static int imb_thread_tile_cmp(const void *a_p, const void *b_p) +static bool imb_thread_tile_cmp(const void *a_p, const void *b_p) { const ImThreadTile *a = a_p; const ImThreadTile *b = b_p; - if (a->ibuf == b->ibuf && a->tx == b->tx && a->ty == b->ty) return 0; - else if (a->ibuf < b->ibuf || a->tx < b->tx || a->ty < b->ty) return -1; - else return 1; + return ((a->ibuf != b->ibuf) || + (a->tx != b->tx) || + (a->ty != b->ty)); } /******************************** Load/Unload ********************************/ |