aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2023-04-07 19:40:57 +0200
committerGitHub <noreply@github.com>2023-04-07 19:40:57 +0200
commit9408f2dcf7cade2631688300e9b58eed6bc5219a (patch)
tree152b8b6135f50619b1fb2a69719d71a180ea0792 /src/nvim/option.c
parent1d2a29f75ba7d094c8e7444c9b249a4a7211c93c (diff)
downloadrneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.tar.gz
rneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.tar.bz2
rneovim-9408f2dcf7cade2631688300e9b58eed6bc5219a.zip
refactor: remove redundant const char * casts
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index a5170715d6..f266dd8c4e 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1235,7 +1235,7 @@ static int parse_option_name(char *arg, int *keyp, int *lenp, int *opt_idxp)
return FAIL;
}
if (arg[1] == 't' && arg[2] == '_') { // could be term code
- opt_idx = findoption_len((const char *)arg + 1, (size_t)(len - 1));
+ opt_idx = findoption_len(arg + 1, (size_t)(len - 1));
}
len++;
if (opt_idx == -1) {
@@ -1251,7 +1251,7 @@ static int parse_option_name(char *arg, int *keyp, int *lenp, int *opt_idxp)
len++;
}
}
- opt_idx = findoption_len((const char *)arg, (size_t)len);
+ opt_idx = findoption_len(arg, (size_t)len);
if (opt_idx == -1) {
key = find_key_option(arg, false);
}
@@ -1869,7 +1869,7 @@ void check_blending(win_T *wp)
/// Handle setting `winhighlight' in window "wp"
bool parse_winhl_opt(win_T *wp)
{
- const char *p = (const char *)wp->w_p_winhl;
+ const char *p = wp->w_p_winhl;
if (!*p) {
if (wp->w_ns_hl_winhl && wp->w_ns_hl == wp->w_ns_hl_winhl) {
@@ -4694,7 +4694,7 @@ void set_context_in_set_cmd(expand_T *xp, char *arg, int opt_flags)
return;
}
nextchar = *p;
- opt_idx = findoption_len((const char *)arg, (size_t)(p - arg));
+ opt_idx = findoption_len(arg, (size_t)(p - arg));
if (opt_idx == -1 || options[opt_idx].var == NULL) {
xp->xp_context = EXPAND_NOTHING;
return;
@@ -5509,7 +5509,7 @@ int win_signcol_count(win_T *wp)
/// Return the number of requested sign columns, based on user / configuration.
int win_signcol_configured(win_T *wp, int *is_fixed)
{
- const char *scl = (const char *)wp->w_p_scl;
+ const char *scl = wp->w_p_scl;
if (is_fixed) {
*is_fixed = 1;
@@ -5607,7 +5607,7 @@ long get_sidescrolloff_value(win_T *wp)
Dictionary get_vimoption(String name, int scope, buf_T *buf, win_T *win, Error *err)
{
- int opt_idx = findoption_len((const char *)name.data, name.size);
+ int opt_idx = findoption_len(name.data, name.size);
VALIDATE_S(opt_idx >= 0, "option (not found)", name.data, {
return (Dictionary)ARRAY_DICT_INIT;
});