From a2386b3e20ea4ddf56525221216aa06900050d5a Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 25 Sep 2014 14:29:23 +0200 Subject: Fix previous commit rB34abb614f1344a6, which broke addons translations. Ghash comp callbacks must return false in case a & b are equal! Also slightly cleaned up gash code using those comp func, since those return booleans now, let's compare tham against booleans! --- source/blender/blenlib/intern/BLI_ghash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib/intern') diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index aa17ef393c9..6747e5c4e7e 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -155,7 +155,7 @@ BLI_INLINE Entry *ghash_lookup_entry_ex(GHash *gh, const void *key, Entry *e; for (e = gh->buckets[hash]; e; e = e->next) { - if (UNLIKELY(gh->cmpfp(key, e->key) == 0)) { + if (UNLIKELY(gh->cmpfp(key, e->key) == false)) { return e; } } @@ -251,7 +251,7 @@ static Entry *ghash_remove_ex(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GH Entry *e_prev = NULL; for (e = gh->buckets[hash]; e; e = e->next) { - if (UNLIKELY(gh->cmpfp(key, e->key) == 0)) { + if (UNLIKELY(gh->cmpfp(key, e->key) == false)) { Entry *e_next = e->next; if (keyfreefp) keyfreefp(e->key); -- cgit v1.2.3