refactor: reduce number of unique char casts

This commit is contained in:
Dundar Göc
2021-10-13 13:25:27 +02:00
parent 33e79237bc
commit 24a1880866
26 changed files with 107 additions and 116 deletions

View File

@@ -4393,8 +4393,8 @@ static void syn_cmd_include(exarg_T *eap, int syncing)
prev_toplvl_grp = curwin->w_s->b_syn_topgrp;
curwin->w_s->b_syn_topgrp = sgl_id;
if (source
? do_source(eap->arg, false, DOSO_NONE) == FAIL
: source_runtime(eap->arg, DIP_ALL) == FAIL) {
? do_source((char *)eap->arg, false, DOSO_NONE) == FAIL
: source_runtime((char *)eap->arg, DIP_ALL) == FAIL) {
EMSG2(_(e_notopen), eap->arg);
}
curwin->w_s->b_syn_topgrp = prev_toplvl_grp;
@@ -6616,10 +6616,10 @@ int load_colors(char_u *name)
buf = xmalloc(buflen);
apply_autocmds(EVENT_COLORSCHEMEPRE, name, curbuf->b_fname, false, curbuf);
snprintf((char *)buf, buflen, "colors/%s.vim", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
retval = source_runtime((char *)buf, DIP_START + DIP_OPT);
if (retval == FAIL) {
snprintf((char *)buf, buflen, "colors/%s.lua", name);
retval = source_runtime(buf, DIP_START + DIP_OPT);
retval = source_runtime((char *)buf, DIP_START + DIP_OPT);
}
xfree(buf);
apply_autocmds(EVENT_COLORSCHEME, name, curbuf->b_fname, false, curbuf);