From 2a17f5225a09c01eb04225d0241c686ea553f912 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 2 Mar 2019 00:41:50 +0100 Subject: Cleanup.. im stupid --- src/tokenizer.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/tokenizer.c b/src/tokenizer.c index e03b441..fdb06cd 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -217,13 +217,8 @@ int tokenizer_consume_if(Tokenizer *self, Token expected_token, bool *result) { } return_if_error(tokenizer_next(self, &actual_token)); - if(actual_token == expected_token) { - self->needs_update = bool_true; - *result = bool_true; - } else { - self->needs_update = bool_false; - *result = bool_false; - } + *result = (actual_token == expected_token); + self->needs_update = *result; return TOKENIZER_OK; } -- cgit v1.2.3