mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 10:18:18 +00:00
refactor: add const and remove unnecessary casts (#22841)
This commit is contained in:
@@ -4670,7 +4670,7 @@ static void find_some_match(typval_T *const argvars, typval_T *const rettv,
|
||||
}
|
||||
}
|
||||
|
||||
regmatch.regprog = vim_regcomp((char *)pat, RE_MAGIC + RE_STRING);
|
||||
regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
if (regmatch.regprog != NULL) {
|
||||
regmatch.rm_ic = p_ic;
|
||||
|
||||
@@ -7895,7 +7895,7 @@ static void f_split(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
}
|
||||
|
||||
regmatch_T regmatch = {
|
||||
.regprog = vim_regcomp((char *)pat, RE_MAGIC + RE_STRING),
|
||||
.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING),
|
||||
.startp = { NULL },
|
||||
.endp = { NULL },
|
||||
.rm_ic = false,
|
||||
@@ -7906,7 +7906,7 @@ static void f_split(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
||||
if (*str == NUL) {
|
||||
match = false; // Empty item at the end.
|
||||
} else {
|
||||
match = vim_regexec_nl(®match, (char *)str, col);
|
||||
match = vim_regexec_nl(®match, str, col);
|
||||
}
|
||||
const char *end;
|
||||
if (match) {
|
||||
|
Reference in New Issue
Block a user