diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/blenkernel/intern/unit.c | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index a5418b8b8c5..4d287429558 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -816,7 +816,7 @@ static char *find_next_op(const char *str, char *remaining_str, int len_max) /* Make sure we don't look backwards before the start of the string. */ if (remaining_str != str && i != 0) { /* Check for scientific notation. */ - if (remaining_str[i - 1] == 'e' || remaining_str[i - 1] == 'E') { + if (ELEM(remaining_str[i - 1], 'e', 'E')) { scientific_notation = true; continue; } @@ -1178,7 +1178,7 @@ bool BKE_unit_replace_string( /* Any operators after this? */ for (ch = str_found + 1; *ch != '\0'; ch++) { - if (*ch == ' ' || *ch == '\t') { + if (ELEM(*ch, ' ', '\t')) { continue; } op_found = (ch_is_op(*ch) || ELEM(*ch, ',', ')')); |