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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-09-25 16:29:23 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-09-25 16:33:19 +0400
commita2386b3e20ea4ddf56525221216aa06900050d5a (patch)
tree94a84194f02525a9060a6cba7d0219be54d0cf15 /source/blender/python/intern/bpy_app_translations.c
parentd165b1b266b9d19775ee73733b63824b8551aea6 (diff)
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!
Diffstat (limited to 'source/blender/python/intern/bpy_app_translations.c')
-rw-r--r--source/blender/python/intern/bpy_app_translations.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index 72ae7bb0e23..0114e8e65e4 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -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)