From aa3a4973a30ff668a62447e18ac41f6c916b4a8b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Nov 2020 12:30:59 +1100 Subject: Cleanup: use ELEM macro --- source/blender/editors/space_text/text_draw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_text/text_draw.c') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index d3e6fd8f79c..2c9ea1d6afa 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -285,7 +285,7 @@ void wrap_offset( end += max; chop = 1; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; chop = 0; if (linep == linein && i >= cursin) { @@ -362,7 +362,7 @@ void wrap_offset_in_line( end += max; chop = 1; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; chop = 0; if (i >= cursin) { @@ -483,7 +483,7 @@ static int text_draw_wrapped(const SpaceText *st, break; } } - else if (str[mi] == ' ' || str[mi] == '-') { + else if (ELEM(str[mi], ' ', '-')) { wrap = i + 1; mend = mi + 1; } @@ -820,7 +820,7 @@ int text_get_visible_lines(const SpaceText *st, ARegion *region, const char *str start = MIN2(end, i); end += max; } - else if (ch == ' ' || ch == '-') { + else if (ELEM(ch, ' ', '-')) { end = i + 1; } -- cgit v1.2.3