refactor: remove long

long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
This commit is contained in:
dundargoc
2023-04-17 22:18:58 +02:00
parent f771d62471
commit fcf3519c65
32 changed files with 234 additions and 237 deletions

View File

@@ -126,7 +126,7 @@ static void set_buffer_lines(buf_T *buf, linenr_T lnum_arg, bool append, typval_
FUNC_ATTR_NONNULL_ARG(4, 5)
{
linenr_T lnum = lnum_arg + (append ? 1 : 0);
long added = 0;
int added = 0;
// When using the current buffer ml_mfp will be set if needed. Useful when
// setline() is used on startup. For other buffers the buffer must be
@@ -442,7 +442,7 @@ void f_deletebufline(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
if (last > curbuf->b_ml.ml_line_count) {
last = curbuf->b_ml.ml_line_count;
}
const long count = last - first + 1;
const int count = last - first + 1;
// When coming here from Insert mode, sync undo, so that this can be
// undone separately from what was previously inserted.