diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-29 14:58:48 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-10-09 11:45:46 +0200 |
commit | 8e932480f61d6101bf8bea1abc07ed93826221fd (patch) | |
tree | 06cf8d0af6e786aba6d01343c54ba52b01738daa /src/nvim/indent_c.c | |
parent | dacd34364ff3af98bc2d357c43e3ce06638e2ce9 (diff) | |
download | rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.gz rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.tar.bz2 rneovim-8e932480f61d6101bf8bea1abc07ed93826221fd.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/indent_c.c')
-rw-r--r-- | src/nvim/indent_c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 7f67a24ef1..b4e56504a7 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -108,7 +108,7 @@ static pos_T *ind_find_start_CORS(linenr_T *is_raw) static pos_T *find_start_rawstring(int ind_maxcomment) // XXX { pos_T *pos; - long cur_maxcomment = ind_maxcomment; + int cur_maxcomment = ind_maxcomment; while (true) { pos = findmatchlimit(NULL, 'R', FM_BACKWARD, cur_maxcomment); @@ -1508,10 +1508,10 @@ static pos_T *find_match_paren_after_brace(int ind_maxparen) // looking a few lines further. static int corr_ind_maxparen(pos_T *startpos) { - long n = (long)startpos->lnum - (long)curwin->w_cursor.lnum; + int n = startpos->lnum - curwin->w_cursor.lnum; if (n > 0 && n < curbuf->b_ind_maxparen / 2) { - return curbuf->b_ind_maxparen - (int)n; + return curbuf->b_ind_maxparen - n; } return curbuf->b_ind_maxparen; } |