diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-09-14 13:07:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-14 04:07:08 -0700 |
commit | b8cce77702777bb876b2cef7e28662cf4539265e (patch) | |
tree | 70424a5319204875e76dbfddb72c931635bd959d /src/nvim/edit.c | |
parent | 6ed43f8f1caad702f9590d174c5ec142f3d85b18 (diff) | |
download | rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.tar.gz rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.tar.bz2 rneovim-b8cce77702777bb876b2cef7e28662cf4539265e.zip |
fix: "redundant cast to the same type" #15662
Apply "redundant cast to the same type" fix from clangd.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 5410343365..a19adca942 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4084,7 +4084,7 @@ int ins_compl_add_tv(typval_T *const tv, const Direction dir, bool fast) flags |= CP_EQUAL; } } else { - word = (const char *)tv_get_string_chk(tv); + word = tv_get_string_chk(tv); memset(cptext, 0, sizeof(cptext)); } if (word == NULL || (!empty && *word == NUL)) { @@ -8345,7 +8345,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p) getvcol(curwin, &curwin->w_cursor, NULL, NULL, &want_vcol); inc_cursor(); if (p_sta && in_indent) { - ts = (int)get_sw_value(curbuf); + ts = get_sw_value(curbuf); want_vcol = (want_vcol / ts) * ts; } else { want_vcol = tabstop_start(want_vcol, @@ -8538,7 +8538,7 @@ static void ins_mousescroll(int dir) if (dir == MSCR_DOWN || dir == MSCR_UP) { if (mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL)) { scroll_redraw(dir, - (long)(curwin->w_botline - curwin->w_topline)); + (curwin->w_botline - curwin->w_topline)); } else { scroll_redraw(dir, 3L); } @@ -8852,7 +8852,7 @@ static bool ins_tab(void) AppendToRedobuff("\t"); if (p_sta && ind) { // insert tab in indent, use 'shiftwidth' - temp = (int)get_sw_value(curbuf); + temp = get_sw_value(curbuf); temp -= get_nolist_virtcol() % temp; } else if (tabstop_count(curbuf->b_p_vsts_array) > 0 || curbuf->b_p_sts != 0) { |