diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/idcode.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/idprop.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 3682de8567d..b3edeb67928 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -103,7 +103,7 @@ static int builtin_font_size = 0; bool BKE_vfont_is_builtin(struct VFont *vfont) { - return (strcmp(vfont->name, FO_BUILTIN_NAME) == 0); + return STREQ(vfont->name, FO_BUILTIN_NAME); } void BKE_vfont_builtin_register(void *mem, int size) @@ -188,7 +188,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *name) PackedFile *temp_pf = NULL; int is_builtin; - if (strcmp(name, FO_BUILTIN_NAME) == 0) { + if (STREQ(name, FO_BUILTIN_NAME)) { BLI_strncpy(filename, name, sizeof(filename)); pf = get_builtin_packedfile(); diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index 7aec97e1582..66f10e86a70 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -89,9 +89,11 @@ static IDType *idtype_from_name(const char *str) { int i = nidtypes; - while (i--) - if (strcmp(str, idtypes[i].name) == 0) + while (i--) { + if (STREQ(str, idtypes[i].name)) { return &idtypes[i]; + } + } return NULL; } diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 19ef1e3971d..8dc284e0a3e 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -451,7 +451,7 @@ void IDP_ReplaceGroupInGroup(IDProperty *dest, IDProperty *src) IDProperty *loop, *prop; for (prop = src->data.group.first; prop; prop = prop->next) { for (loop = dest->data.group.first; loop; loop = loop->next) { - if (strcmp(loop->name, prop->name) == 0) { + if (STREQ(loop->name, prop->name)) { IDProperty *copy = IDP_CopyProperty(prop); BLI_insertlinkafter(&dest->data.group, loop, copy); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 74d43b61429..f2e81f0d6a4 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -856,7 +856,7 @@ static void seqbase_unique_name(ListBase *seqbasep, SeqUniqueInfo *sui) { Sequence *seq; for (seq = seqbasep->first; seq; seq = seq->next) { - if (sui->seq != seq && strcmp(sui->name_dest, seq->name + 2) == 0) { + if ((sui->seq != seq) && STREQ(sui->name_dest, seq->name + 2)) { /* SEQ_NAME_MAXSTR - 2 for prefix, -1 for \0, -4 for the number */ BLI_snprintf(sui->name_dest, sizeof(sui->name_dest), "%.59s.%03d", sui->name_src, sui->count++); sui->match = 1; /* be sure to re-scan */ @@ -3861,7 +3861,7 @@ Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, int recu Sequence *rseq = NULL; for (iseq = seqbase->first; iseq; iseq = iseq->next) { - if (strcmp(name, iseq->name + 2) == 0) + if (STREQ(name, iseq->name + 2)) return iseq; else if (recursive && (iseq->seqbase.first) && (rseq = BKE_sequence_get_by_name(&iseq->seqbase, name, 1))) { return rseq; |