diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-10-12 17:52:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 17:52:54 +0200 |
commit | 649b3160a10f0053747383f0703b0a5a94548570 (patch) | |
tree | 2898b7213ab1349717c360c8d7561a4606f3c8c2 /src/nvim/eval/funcs.c | |
parent | 64f0fdc6822db4fc1ef5fadb892aab5bf04e75a7 (diff) | |
download | rneovim-649b3160a10f0053747383f0703b0a5a94548570.tar.gz rneovim-649b3160a10f0053747383f0703b0a5a94548570.tar.bz2 rneovim-649b3160a10f0053747383f0703b0a5a94548570.zip |
refactor: reduce number of unique char casts (#15995)
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 709ef8e5b6..17cf141b54 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -491,7 +491,7 @@ static void f_assert_report(typval_T *argvars, typval_T *rettv, FunPtr fptr) garray_T ga; prepare_assert_error(&ga); - ga_concat(&ga, (const char_u *)tv_get_string(&argvars[0])); + ga_concat(&ga, tv_get_string(&argvars[0])); assert_error(&ga); ga_clear(&ga); rettv->vval.v_number = 1; @@ -5909,7 +5909,7 @@ static void f_list2str(typval_T *argvars, typval_T *rettv, FunPtr fptr) TV_LIST_ITER_CONST(l, li, { buf[utf_char2bytes(tv_get_number(TV_LIST_ITEM_TV(li)), buf)] = NUL; - ga_concat(&ga, buf); + ga_concat(&ga, (char *)buf); }); ga_append(&ga, NUL); @@ -12012,10 +12012,10 @@ static void f_winrestcmd(typval_T *argvars, typval_T *rettv, FunPtr fptr) FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { snprintf((char *)buf, sizeof(buf), "%dresize %d|", winnr, wp->w_height); - ga_concat(&ga, buf); + ga_concat(&ga, (char *)buf); snprintf((char *)buf, sizeof(buf), "vert %dresize %d|", winnr, wp->w_width); - ga_concat(&ga, buf); + ga_concat(&ga, (char *)buf); winnr++; } } |