diff options
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_autocomplete.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c index 99e1606c9bd..19af71c9139 100644 --- a/source/blender/editors/space_text/text_autocomplete.c +++ b/source/blender/editors/space_text/text_autocomplete.c @@ -183,7 +183,7 @@ static GHash *text_autocomplete_build(Text *text) const int choice_len = i_end - i_start; if ((choice_len > seek_len) && - (seek_len == 0 || strncmp(seek, str_sub, seek_len) == 0) && + (seek_len == 0 || STREQLEN(seek, str_sub, seek_len)) && (seek != str_sub)) { // printf("Adding: %s\n", s); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index bc5c56c3e58..462b619f497 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -549,7 +549,7 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar) full_update |= drawcache->tabnumber != st->tabnumber; /* word-wrapping option was toggled */ full_update |= drawcache->lheight != st->lheight_dpi; /* word-wrapping option was toggled */ full_update |= drawcache->cwidth != st->cwidth; /* word-wrapping option was toggled */ - full_update |= strncmp(drawcache->text_id, txt->id.name, MAX_ID_NAME); /* text datablock was changed */ + full_update |= !STREQLEN(drawcache->text_id, txt->id.name, MAX_ID_NAME); /* text datablock was changed */ if (st->wordwrap) { /* update line heights */ diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 1185d37f813..ad8050a50e8 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2923,7 +2923,7 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode) if (mode != TEXT_FIND && txt_has_sel(text)) { tmp = txt_sel_to_buf(text); - if (flags & ST_MATCH_CASE) found = strcmp(st->findstr, tmp) == 0; + if (flags & ST_MATCH_CASE) found = STREQ(st->findstr, tmp); else found = BLI_strcasecmp(st->findstr, tmp) == 0; if (found) { |