From 79f342b954a6f47ee3f1277a899066a654e7c330 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 4 May 2016 15:19:47 -0700 Subject: lint cleanup: eliminate "redundant" errors This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses. --- src/tokenizer.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/tokenizer.cpp') diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 746807eb..3bc5a152 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -167,12 +167,11 @@ void tokenizer_t::read_string() { TOK_CALL_ERROR(this, TOK_UNTERMINATED_ESCAPE, UNTERMINATED_ESCAPE_ERROR, error_location); return; - } else { - // Since we are about to increment tok->buff, decrement it first so the - // increment doesn't go past the end of the buffer. See issue #389. - this->buff--; - do_loop = 0; } + // Since we are about to increment tok->buff, decrement it first so the + // increment doesn't go past the end of the buffer. See issue #389. + this->buff--; + do_loop = 0; } this->buff++; @@ -502,17 +501,12 @@ void tokenizer_t::tok_next() { this->read_comment(); if (this->buff[0] == L'\n' && this->continue_line_after_comment) this->buff++; - return; - } else { - while (*(this->buff) != L'\n' && *(this->buff) != L'\0') this->buff++; - - if (this->buff[0] == L'\n' && this->continue_line_after_comment) this->buff++; } - while (my_iswspace(*(this->buff))) { - this->buff++; - } + while (*(this->buff) != L'\n' && *(this->buff) != L'\0') this->buff++; + if (this->buff[0] == L'\n' && this->continue_line_after_comment) this->buff++; + while (my_iswspace(*(this->buff))) this->buff++; } this->continue_line_after_comment = false; -- cgit v1.2.3