strings: Remove vim_strbyte

Ref #1476
This commit is contained in:
ZyX
2017-04-06 21:31:37 +03:00
parent 19044a15f9
commit 171baaee93
6 changed files with 29 additions and 67 deletions

View File

@@ -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;
}