aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tokenizer.cpp
diff options
context:
space:
mode:
authorGravatar Kurtis Rader <krader@skepticism.us>2016-05-04 15:19:47 -0700
committerGravatar Kurtis Rader <krader@skepticism.us>2016-05-04 15:32:04 -0700
commit79f342b954a6f47ee3f1277a899066a654e7c330 (patch)
treea9386ce1e108a5c046276e4266e0129404fc4ea0 /src/tokenizer.cpp
parent527e5f52ba5a097a24490065fea23b4627032e4c (diff)
lint cleanup: eliminate "redundant" errors
This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses.
Diffstat (limited to 'src/tokenizer.cpp')
-rw-r--r--src/tokenizer.cpp20
1 files changed, 7 insertions, 13 deletions
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;