Merge pull request #30576 from qarmin/lgtm_coverage

Changed some code reported by LGTM and Coverity
This commit is contained in:
Rémi Verschelde 2019-07-20 12:00:13 +02:00 committed by GitHub
commit d15cf7b672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 94 additions and 202 deletions

View file

@ -801,17 +801,13 @@ Error Expression::_get_token(Token &r_token) {
#define GET_CHAR() (str_ofs >= expression.length() ? 0 : expression[str_ofs++])
CharType cchar = GET_CHAR();
if (cchar == 0) {
r_token.type = TK_EOF;
return OK;
}
switch (cchar) {
case 0: {
r_token.type = TK_EOF;
return OK;
} break;
};
case '{': {
r_token.type = TK_CURLY_BRACKET_OPEN;