diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-16 22:14:28 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-19 11:43:21 +0100 |
commit | 7f6b775b45de5011ff1c44e63e57551566d80704 (patch) | |
tree | 54eab8482051d2d1a958fcf9f6c9bcbb02827717 /src/nvim/ex_eval.c | |
parent | 693aea0e9e1032aee85d56c1a3f33e0811dbdc18 (diff) | |
download | rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.gz rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.tar.bz2 rneovim-7f6b775b45de5011ff1c44e63e57551566d80704.zip |
refactor: use `bool` to represent boolean values
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index bc4cb634e8..c239e8a9ea 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -92,7 +92,7 @@ static void discard_pending_return(typval_T *p) // expression evaluation is done without producing any error messages, but all // error messages on parsing errors during the expression evaluation are given // (even if a try conditional is active). -static int cause_abort = false; +static bool cause_abort = false; /// @return true when immediately aborting on error, or when an interrupt /// occurred or an exception was thrown but not caught. @@ -844,7 +844,7 @@ void ex_if(exarg_T *eap) int skip = CHECK_SKIP; bool error; - int result = eval_to_bool(eap->arg, &error, eap, skip); + bool result = eval_to_bool(eap->arg, &error, eap, skip); if (!skip && !error) { if (result) { @@ -971,7 +971,7 @@ void ex_while(exarg_T *eap) if (cstack->cs_idx == CSTACK_LEN - 1) { eap->errmsg = _("E585: :while/:for nesting too deep"); } else { - int result; + bool result; // The loop flag is set when we have jumped back from the matching // ":endwhile" or ":endfor". When not set, need to initialise this // cstack entry. @@ -1183,7 +1183,7 @@ void ex_throw(exarg_T *eap) /// used for rethrowing an uncaught exception. void do_throw(cstack_T *cstack) { - int inactivate_try = false; + bool inactivate_try = false; // Cleanup and deactivate up to the next surrounding try conditional that // is not in its finally clause. Normally, do not deactivate the try @@ -1861,7 +1861,7 @@ void leave_cleanup(cleanup_T *csp) int cleanup_conditionals(cstack_T *cstack, int searched_cond, int inclusive) { int idx; - int stop = false; + bool stop = false; for (idx = cstack->cs_idx; idx >= 0; idx--) { if (cstack->cs_flags[idx] & CSF_TRY) { @@ -1998,7 +1998,7 @@ void ex_endfunction(exarg_T *eap) } /// @return true if the string "p" looks like a ":while" or ":for" command. -int has_loop_cmd(char *p) +bool has_loop_cmd(char *p) { // skip modifiers, white space and ':' while (true) { |