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!
This commit is contained in:
2014-09-25 14:29:23 +02:00
parent d165b1b266
commit a2386b3e20
2 changed files with 5 additions and 6 deletions

View File

@@ -92,10 +92,9 @@ static bool _ghashutil_keycmp(const void *a, const void *b)
const GHashKey *B = b;
/* Note: comparing msgid first, most of the time it will be enough! */
int cmp = BLI_ghashutil_strcmp(A->msgid, B->msgid);
if (cmp == 0)
return BLI_ghashutil_strcmp(A->msgctxt, B->msgctxt) == 0;
return false;
if (BLI_ghashutil_strcmp(A->msgid, B->msgid) == false)
return BLI_ghashutil_strcmp(A->msgctxt, B->msgctxt);
return true; /* true means they are not equal! */
}
static void _ghashutil_keyfree(void *ptr)