mirror of
https://github.com/neovim/neovim.git
synced 2025-10-13 13:26:06 +00:00
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:
@@ -801,8 +801,8 @@ static char *ex_let_option(char *arg, typval_T *const tv, const bool is_const,
|
||||
|
||||
if (op != NULL && *op != '=') {
|
||||
if (!hidden && is_num) { // number or bool
|
||||
Integer cur_n = curval.type == kOptValTypeNumber ? curval.data.number : curval.data.boolean;
|
||||
Integer new_n = newval.type == kOptValTypeNumber ? newval.data.number : newval.data.boolean;
|
||||
OptInt cur_n = curval.type == kOptValTypeNumber ? curval.data.number : curval.data.boolean;
|
||||
OptInt new_n = newval.type == kOptValTypeNumber ? newval.data.number : newval.data.boolean;
|
||||
|
||||
switch (*op) {
|
||||
case '+':
|
||||
@@ -1873,7 +1873,7 @@ static OptVal tv_to_optval(typval_T *tv, const char *option, uint32_t flags, boo
|
||||
semsg(_("E521: Number required: &%s = '%s'"), option, tv->vval.v_string);
|
||||
}
|
||||
}
|
||||
value = (flags & P_NUM) ? NUMBER_OPTVAL(n)
|
||||
value = (flags & P_NUM) ? NUMBER_OPTVAL((OptInt)n)
|
||||
: BOOLEAN_OPTVAL(n == 0 ? kFalse : (n >= 1 ? kTrue : kNone));
|
||||
} else if ((flags & P_STRING) || is_tty_option(option)) {
|
||||
// Avoid setting string option to a boolean or a special value.
|
||||
|
Reference in New Issue
Block a user