From fca515838e70f8bec7028b840bb921a1be9fabbb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Jan 2015 16:03:11 +0100 Subject: 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... --- source/blender/blenkernel/intern/mball.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/blenkernel/intern/mball.c') diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 5649164a273..ce20636233a 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -468,7 +468,7 @@ bool BKE_mball_is_basis_for(Object *ob1, Object *ob2) BLI_split_name_num(basis1name, &basis1nr, ob1->id.name + 2, '.'); BLI_split_name_num(basis2name, &basis2nr, ob2->id.name + 2, '.'); - if (!strcmp(basis1name, basis2name)) { + if (STREQ(basis1name, basis2name)) { return BKE_mball_is_basis(ob1); } else { @@ -503,7 +503,7 @@ void BKE_mball_properties_copy(Scene *scene, Object *active_object) /* Object ob has to be in same "group" ... it means, that it has to have * same base of its name */ - if (strcmp(obname, basisname) == 0) { + if (STREQ(obname, basisname)) { MetaBall *mb = ob->data; /* Copy properties from selected/edited metaball */ @@ -545,7 +545,7 @@ Object *BKE_mball_basis_find(Scene *scene, Object *basis) BLI_split_name_num(obname, &obnr, ob->id.name + 2, '.'); /* object ob has to be in same "group" ... it means, that it has to have same base of its name */ - if (strcmp(obname, basisname) == 0) { + if (STREQ(obname, basisname)) { if (obnr < basisnr) { basis = ob; basisnr = obnr; @@ -1679,7 +1679,7 @@ static float init_meta(EvaluationContext *eval_ctx, PROCESS *process, Scene *sce int nr; BLI_split_name_num(name, &nr, bob->id.name + 2, '.'); - if (strcmp(obname, name) == 0) { + if (STREQ(obname, name)) { mb = bob->data; if (mb->editelems) ml = mb->editelems->first; @@ -2243,7 +2243,7 @@ static void mball_count(EvaluationContext *eval_ctx, PROCESS *process, Scene *sc /* object ob has to be in same "group" ... it means, that it has to have * same base of its name */ - if (strcmp(obname, basisname) == 0) { + if (STREQ(obname, basisname)) { MetaBall *mb = ob->data; /* if object is in edit mode, then dynamic list of all MetaElems -- cgit v1.2.3