diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-11-05 20:19:06 +0100 |
commit | acc646ad8fc3ef11fcc63b69f3d8484e4a91accd (patch) | |
tree | 613753f19fe6f6fa45884750eb176c1517269ec2 /src/nvim/diff.c | |
parent | c513cbf361000e6f09cd5b71b718e9de3f88904d (diff) | |
download | rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.gz rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.tar.bz2 rneovim-acc646ad8fc3ef11fcc63b69f3d8484e4a91accd.zip |
refactor: the long goodbye
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
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 8516e33638..920a535ddf 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -106,9 +106,9 @@ typedef struct { // used for recording hunks from xdiff typedef struct { linenr_T lnum_orig; - long count_orig; + int count_orig; linenr_T lnum_new; - long count_new; + int count_new; } diffhunk_T; // two diff inputs and one result @@ -771,7 +771,7 @@ static int diff_write_buffer(buf_T *buf, mmfile_t *m, linenr_T start, linenr_T e return FAIL; } m->ptr = ptr; - m->size = (long)len; + m->size = (int)len; len = 0; for (linenr_T lnum = start; lnum <= end; lnum++) { @@ -2571,7 +2571,7 @@ int diffopt_changed(void) // recompute the scroll binding with the new option value, may // remove or add filler lines - check_scrollbind((linenr_T)0, 0L); + check_scrollbind(0, 0); return OK; } @@ -3217,7 +3217,7 @@ bool diff_mode_buf(buf_T *buf) /// @param count /// /// @return FAIL if there isn't such a diff block. -int diff_move_to(int dir, long count) +int diff_move_to(int dir, int count) { linenr_T lnum = curwin->w_cursor.lnum; int idx = diff_buf_idx(curbuf); |