diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-06 21:31:37 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-04-07 23:15:53 +0300 |
commit | 171baaee93c8e257ef593b30c05405d03ac30c96 (patch) | |
tree | 61dedde22778658a32a8bfd2d4a9f00ec6482885 /src/nvim/regexp_nfa.c | |
parent | 19044a15f9d41a7424e94fb3f0e257537e7afa5e (diff) | |
download | rneovim-171baaee93c8e257ef593b30c05405d03ac30c96.tar.gz rneovim-171baaee93c8e257ef593b30c05405d03ac30c96.tar.bz2 rneovim-171baaee93c8e257ef593b30c05405d03ac30c96.zip |
strings: Remove vim_strbyte
Ref #1476
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r-- | src/nvim/regexp_nfa.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 5b49ab38f0..a77978884e 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -4855,17 +4855,10 @@ static int failure_chance(nfa_state_T *state, int depth) */ static int skip_to_start(int c, colnr_T *colp) { - char_u *s; - - /* Used often, do some work to avoid call overhead. */ - if (!ireg_ic - && !has_mbyte - ) - s = vim_strbyte(regline + *colp, c); - else - s = cstrchr(regline + *colp, c); - if (s == NULL) + const char_u *const s = cstrchr(regline + *colp, c); + if (s == NULL) { return FAIL; + } *colp = (int)(s - regline); return OK; } |