diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-06 17:40:40 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-02-06 17:40:40 -0500 |
commit | f9c0af0180411429ad315a0d2974c477ac740f70 (patch) | |
tree | d9ecd901643a31baf33311f959e08595da012a6e /src | |
parent | bea99729dd66a1d3c5351cbe6a7677df0619a33f (diff) | |
download | rneovim-f9c0af0180411429ad315a0d2974c477ac740f70.tar.gz rneovim-f9c0af0180411429ad315a0d2974c477ac740f70.tar.bz2 rneovim-f9c0af0180411429ad315a0d2974c477ac740f70.zip |
eval: ll_range,ll_empty2 members are bool
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 17 | ||||
-rw-r--r-- | src/nvim/eval.h | 4 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index a25b140b2f..f1df1ecc68 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2121,9 +2121,10 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, return NULL; } } - lp->ll_range = TRUE; - } else - lp->ll_range = FALSE; + lp->ll_range = true; + } else { + lp->ll_range = false; + } if (*p != ']') { if (!quiet) { @@ -2240,12 +2241,10 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, return NULL; } - /* - * May need to find the item or absolute index for the second - * index of a range. - * When no index given: "lp->ll_empty2" is TRUE. - * Otherwise "lp->ll_n2" is set to the second index. - */ + // May need to find the item or absolute index for the second + // index of a range. + // When no index given: "lp->ll_empty2" is true. + // Otherwise "lp->ll_n2" is set to the second index. if (lp->ll_range && !lp->ll_empty2) { lp->ll_n2 = (long)tv_get_number(&var2); // Is number or string. tv_clear(&var2); diff --git a/src/nvim/eval.h b/src/nvim/eval.h index a005d89cd0..c1891758ea 100644 --- a/src/nvim/eval.h +++ b/src/nvim/eval.h @@ -56,8 +56,8 @@ typedef struct lval_S { ///< isn't NULL it's the Dict to which to add the item. listitem_T *ll_li; ///< The list item or NULL. list_T *ll_list; ///< The list or NULL. - int ll_range; ///< TRUE when a [i:j] range was used. - int ll_empty2; ///< Second index is empty: [i:]. + bool ll_range; ///< true when a [i:j] range was used. + bool ll_empty2; ///< Second index is empty: [i:]. long ll_n1; ///< First index for list. long ll_n2; ///< Second index for list range. dict_T *ll_dict; ///< The Dictionary or NULL. |