From 4d652aac45367e17c0ba815ef129fa0648a0e2a5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 22 Oct 2014 12:55:01 -0700 Subject: [PATCH] Use stdbool in tree.h --- src/runtime/tree.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/tree.h b/src/runtime/tree.h index 0500042e..4a16fb62 100644 --- a/src/runtime/tree.h +++ b/src/runtime/tree.h @@ -31,11 +31,11 @@ typedef struct { TSLength offset; } TSTreeChild; -static inline int ts_tree_is_extra(const TSTree *tree) { - return (tree->options & TSTreeOptionsExtra); +static inline bool ts_tree_is_extra(const TSTree *tree) { + return !!(tree->options & TSTreeOptionsExtra); } -static inline int ts_tree_is_visible(const TSTree *tree) { +static inline bool ts_tree_is_visible(const TSTree *tree) { return !(tree->options & TSTreeOptionsHidden); } @@ -43,8 +43,8 @@ static inline void ts_tree_set_extra(TSTree *tree) { tree->options = (TSTreeOptions)(tree->options | TSTreeOptionsExtra); } -static inline int ts_tree_is_wrapper(const TSTree *tree) { - return (tree->options & TSTreeOptionsWrapper); +static inline bool ts_tree_is_wrapper(const TSTree *tree) { + return !!(tree->options & TSTreeOptionsWrapper); } TSTree *ts_tree_make_leaf(TSSymbol, TSLength, TSLength, bool);