aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-09 08:15:18 +0800
committerGitHub <noreply@github.com>2022-03-09 08:15:18 +0800
commit205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d (patch)
treeb3db8da594fd829224607a11d21b43b3d329b76f /src/nvim/eval
parentf33cea4682340ea2b622fa879dd6fca2c80ea1d5 (diff)
parentff032f2710974dcf5930187f1925534da93db199 (diff)
downloadrneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.tar.gz
rneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.tar.bz2
rneovim-205b3765f2c04e3839b15a8d1ce79bd7ea8e4d3d.zip
Merge pull request #17622 from dundargoc/refactor/clang-tidy/remove-redundant-casts
refactor/clang tidy/remove redundant casts
Diffstat (limited to 'src/nvim/eval')
-rw-r--r--src/nvim/eval/funcs.c8
-rw-r--r--src/nvim/eval/userfunc.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index 7da4fe62e8..f47c9c482b 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -11413,13 +11413,13 @@ static void f_synIDattr(typval_T *argvars, typval_T *rettv, FunPtr fptr)
if (len <= 5 || (TOLOWER_ASC(what[5]) == 'l' && len <= 9)) { // underline
p = highlight_has_attr(id, HL_UNDERLINE, modec);
} else if (TOLOWER_ASC(what[5]) == 'c') { // undercurl
- p = highlight_has_attr(id, HL_UNDERCURL, modec);
+ p = highlight_has_attr(id, HL_UNDERCURL, modec);
} else if (len > 9 && TOLOWER_ASC(what[9]) == 'l') { // underlineline
- p = highlight_has_attr(id, HL_UNDERLINELINE, modec);
+ p = highlight_has_attr(id, HL_UNDERLINELINE, modec);
} else if (len > 6 && TOLOWER_ASC(what[6]) == 'o') { // underdot
- p = highlight_has_attr(id, HL_UNDERDOT, modec);
+ p = highlight_has_attr(id, HL_UNDERDOT, modec);
} else { // underdash
- p = highlight_has_attr(id, HL_UNDERDASH, modec);
+ p = highlight_has_attr(id, HL_UNDERDASH, modec);
}
break;
}
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 5764f9fbd4..471c4092fe 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -516,7 +516,7 @@ static char_u *fname_trans_sid(const char_u *const name, char_u *const fname_buf
if (llen > 0) {
fname_buf[0] = K_SPECIAL;
fname_buf[1] = KS_EXTRA;
- fname_buf[2] = (int)KE_SNR;
+ fname_buf[2] = KE_SNR;
int i = 3;
if (eval_fname_sid((const char *)name)) { // "<SID>" or "s:"
if (current_sctx.sc_sid <= 0) {
@@ -1713,7 +1713,7 @@ char_u *trans_function_name(char_u **pp, bool skip, int flags, funcdict_T *fdp,
// Check for hard coded <SNR>: already translated function ID (from a user
// command).
if ((*pp)[0] == K_SPECIAL && (*pp)[1] == KS_EXTRA
- && (*pp)[2] == (int)KE_SNR) {
+ && (*pp)[2] == KE_SNR) {
*pp += 3;
len = get_id_len((const char **)pp) + 3;
return (char_u *)xmemdupz(start, len);
@@ -1821,7 +1821,7 @@ char_u *trans_function_name(char_u **pp, bool skip, int flags, funcdict_T *fdp,
// Change "<SNR>" to the byte sequence.
name[0] = K_SPECIAL;
name[1] = KS_EXTRA;
- name[2] = (int)KE_SNR;
+ name[2] = KE_SNR;
memmove(name + 3, name + 5, strlen((char *)name + 5) + 1);
}
goto theend;
@@ -1888,7 +1888,7 @@ char_u *trans_function_name(char_u **pp, bool skip, int flags, funcdict_T *fdp,
if (!skip && lead > 0) {
name[0] = K_SPECIAL;
name[1] = KS_EXTRA;
- name[2] = (int)KE_SNR;
+ name[2] = KE_SNR;
if (sid_buf_len > 0) { // If it's "<SID>"
memcpy(name + 3, sid_buf, sid_buf_len);
}