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/fold.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/fold.c')
-rw-r--r-- | src/nvim/fold.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c index 567cf9c8c3..bfc72e6af8 100644 --- a/src/nvim/fold.c +++ b/src/nvim/fold.c @@ -309,7 +309,7 @@ foldinfo_T fold_info(win_T *win, linenr_T lnum) linenr_T last; if (hasFoldingWin(win, lnum, NULL, &last, false, &info)) { - info.fi_lines = (long)(last - lnum + 1); + info.fi_lines = (last - lnum + 1); } else { info.fi_lines = 0; } @@ -2374,14 +2374,14 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level, // nested folds (with relative line numbers) down. foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, (linenr_T)0, (linenr_T)MAXLNUM, - (long)(fp->fd_top - firstlnum), 0L); + (fp->fd_top - firstlnum), 0L); } else { // Will move fold down, move nested folds relatively up. foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, (linenr_T)0, - (long)(firstlnum - fp->fd_top - 1), + (firstlnum - fp->fd_top - 1), (linenr_T)MAXLNUM, - (long)(fp->fd_top - firstlnum)); + (fp->fd_top - firstlnum)); } fp->fd_len += fp->fd_top - firstlnum; fp->fd_top = firstlnum; @@ -2444,7 +2444,7 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level, * to stop just above startlnum. */ fp->fd_len = startlnum - fp->fd_top; foldMarkAdjustRecurse(flp->wp, &fp->fd_nested, - (linenr_T)fp->fd_len, (linenr_T)MAXLNUM, + fp->fd_len, (linenr_T)MAXLNUM, (linenr_T)MAXLNUM, 0L); fold_changed = true; } @@ -2622,8 +2622,8 @@ static linenr_T foldUpdateIEMSRecurse(garray_T *const gap, const int level, if (fp2->fd_top < flp->lnum) { // Make fold that includes lnum start at lnum. foldMarkAdjustRecurse(flp->wp, &fp2->fd_nested, - (linenr_T)0, (long)(flp->lnum - fp2->fd_top - 1), - (linenr_T)MAXLNUM, (long)(fp2->fd_top-flp->lnum)); + (linenr_T)0, (flp->lnum - fp2->fd_top - 1), + (linenr_T)MAXLNUM, (fp2->fd_top-flp->lnum)); fp2->fd_len -= flp->lnum - fp2->fd_top; fp2->fd_top = flp->lnum; fold_changed = true; @@ -2767,8 +2767,8 @@ static void foldRemove(win_T *const wp, garray_T *gap, linenr_T top, linenr_T bo if (fp->fd_top + fp->fd_len - 1 > bot) { // 5: Make fold that includes bot start below bot. foldMarkAdjustRecurse(wp, &fp->fd_nested, - (linenr_T)0, (long)(bot - fp->fd_top), - (linenr_T)MAXLNUM, (long)(fp->fd_top - bot - 1)); + (linenr_T)0, (bot - fp->fd_top), + (linenr_T)MAXLNUM, (fp->fd_top - bot - 1)); fp->fd_len -= bot - fp->fd_top + 1; fp->fd_top = bot + 1; break; |