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>2015-01-26 18:03:11 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-26 18:59:24 +0300
commitfca515838e70f8bec7028b840bb921a1be9fabbb (patch)
tree1752923de19eca5f01ca4cfb5754fd4d1f13d934 /source/blender/blenfont
parentd44890ee75634052f325531766a661a5bcef628f (diff)
Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf.c4
-rw-r--r--source/blender/blenfont/intern/blf_translation.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index 6bbf07173b9..127826f98c8 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -137,7 +137,7 @@ static int blf_search(const char *name)
for (i = 0; i < BLF_MAX_FONT; i++) {
font = global_font[i];
- if (font && (!strcmp(font->name, name)))
+ if (font && (STREQ(font->name, name)))
return i;
}
@@ -324,7 +324,7 @@ void BLF_unload(const char *name)
for (i = 0; i < BLF_MAX_FONT; i++) {
font = global_font[i];
- if (font && (!strcmp(font->name, name))) {
+ if (font && (STREQ(font->name, name))) {
blf_font_free(font);
global_font[i] = NULL;
}
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
index e7d2c14b16f..2a4a152f0eb 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -133,7 +133,7 @@ void BLF_free_unifont_mono(void)
bool BLF_is_default_context(const char *msgctxt)
{
/* We use the "short" test, a more complete one could be:
- * return (!msgctxt || !msgctxt[0] || !strcmp(msgctxt == BLF_I18NCONTEXT_DEFAULT_BPYRNA))
+ * return (!msgctxt || !msgctxt[0] || STREQ(msgctxt, BLF_I18NCONTEXT_DEFAULT_BPYRNA))
*/
/* Note: trying without the void string check for now, it *should* not be necessary... */
return (!msgctxt || msgctxt[0] == BLF_I18NCONTEXT_DEFAULT_BPYRNA[0]);