From f9f707033665dc737f1011e82406a12fafa78326 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 10 Mar 2013 06:18:03 +0000 Subject: add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. --- source/blender/bmesh/intern/bmesh_operators.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_operators.c') diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 085b8b9bc80..f52dd7f2be9 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -1521,7 +1521,7 @@ static int bmo_name_to_slotcode(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char int i = 0; while (slot_args->slot_name) { - if (strncmp(identifier, slot_args->slot_name, MAX_SLOTNAME) == 0) { + if (STREQLEN(identifier, slot_args->slot_name, MAX_SLOTNAME)) { return i; } slot_args++; @@ -1546,7 +1546,7 @@ static int bmo_opname_to_opcode(const char *opname) int i; for (i = 0; i < bmo_opdefines_total; i++) { - if (!strcmp(opname, bmo_opdefines[i]->opname)) { + if (STREQ(opname, bmo_opdefines[i]->opname)) { return i; } } -- cgit v1.2.3