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/makesrna/intern/rna_scene.c
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/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 7dd0185b3c6..1cc9ef15f08 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -385,7 +385,7 @@ static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key
Base *base;
for (base = scene->base.first; base; base = base->next) {
- if (strncmp(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2) == 0) {
+ if (STREQLEN(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2)) {
*r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base);
return true;
}
@@ -1158,7 +1158,7 @@ static int rna_RenderSettings_engine_get(PointerRNA *ptr)
int a = 0;
for (type = R_engines.first; type; type = type->next, a++)
- if (strcmp(type->idname, rd->engine) == 0)
+ if (STREQ(type->idname, rd->engine))
return a;
return 0;
@@ -1243,7 +1243,7 @@ static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
RenderEngineType *type;
for (type = R_engines.first; type; type = type->next)
- if (strcmp(type->idname, rd->engine) == 0)
+ if (STREQ(type->idname, rd->engine))
return (type->flag & RE_GAME);
return 0;