diff options
author | dundargoc <gocdundar@gmail.com> | 2023-11-11 11:20:08 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-11 13:31:17 +0100 |
commit | 8e58d37f2e15ac8540377148e55ed08a039aadb6 (patch) | |
tree | 799dd1f30d375ac8cdeae196fceec9d2ad0f134a /src/nvim/diff.c | |
parent | c4ad15ae324f6460c683a64c44d65e693e1f39bb (diff) | |
download | rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.tar.gz rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.tar.bz2 rneovim-8e58d37f2e15ac8540377148e55ed08a039aadb6.zip |
refactor: remove redundant casts
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 920a535ddf..27c4899e05 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -824,7 +824,7 @@ static int diff_write(buf_T *buf, diffin_T *din) // so it shouldn't update the '[ and '] marks. cmdmod.cmod_flags |= CMOD_LOCKMARKS; int r = buf_write(buf, din->din_fname, NULL, - (linenr_T)1, buf->b_ml.ml_line_count, + 1, buf->b_ml.ml_line_count, NULL, false, false, false, true); cmdmod.cmod_flags = save_cmod_flags; free_string_option(buf->b_p_ff); @@ -1208,7 +1208,7 @@ void ex_diffpatch(exarg_T *eap) // Write the current buffer to "tmp_orig". if (buf_write(curbuf, tmp_orig, NULL, - (linenr_T)1, curbuf->b_ml.ml_line_count, + 1, curbuf->b_ml.ml_line_count, NULL, false, false, false, true) == FAIL) { goto theend; } @@ -3106,7 +3106,7 @@ static void diffgetput(const int addr_count, const int idx_cur, const int idx_fr // which results in inaccurate reporting of the byte count of // previous contents in buffer-update events. buf_empty = false; - ml_delete((linenr_T)2, false); + ml_delete(2, false); } } linenr_T new_count = dp->df_count[idx_to] + added; @@ -3360,7 +3360,7 @@ linenr_T diff_lnum_win(linenr_T lnum, win_T *wp) if (idx == DB_COUNT) { // safety check - return (linenr_T)0; + return 0; } if (curtab->tp_diff_invalid) { @@ -3386,7 +3386,7 @@ linenr_T diff_lnum_win(linenr_T lnum, win_T *wp) if (i == DB_COUNT) { // safety check - return (linenr_T)0; + return 0; } linenr_T n = lnum + (dp->df_lnum[i] - dp->df_lnum[idx]); |