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/editors/object/object_constraint.c | 2 +- source/blender/editors/object/object_edit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 2596ea0a064..8f793f7f7f9 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -471,7 +471,7 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) /* TODO: clear subtarget? */ curcon->flag |= CONSTRAINT_DISABLE; } - else if (strcmp(pchan->name, ct->subtarget) == 0) { + else if (STREQ(pchan->name, ct->subtarget)) { /* cannot target self */ ct->subtarget[0] = '\0'; curcon->flag |= CONSTRAINT_DISABLE; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 93956128b84..62c27d8922d 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1347,7 +1347,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) ID *data; Curve *cu; Nurb *nu; - int clear = (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0); + int clear = (STREQ(op->idname, "OBJECT_OT_shade_flat")); bool done = false, linked_data = false; CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) -- cgit v1.2.3