From 85220fec010a4946cb364974eac69418b4e06411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 19 May 2020 15:46:49 +0200 Subject: Style: Remove unnecessary semicolons from `core` Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment. --- core/io/json.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'core/io/json.cpp') diff --git a/core/io/json.cpp b/core/io/json.cpp index 03f4e65220..1c603865ad 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -91,7 +91,7 @@ String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_ } s += end_statement + _make_indent(p_indent, p_cur_indent) + "]"; return s; - }; + } case Variant::DICTIONARY: { String s = "{"; s += end_statement; @@ -115,7 +115,7 @@ String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_ s += end_statement + _make_indent(p_indent, p_cur_indent) + "}"; return s; - }; + } default: return "\"" + String(p_var).json_escape() + "\""; } @@ -132,7 +132,7 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to line++; index++; break; - }; + } case 0: { r_token.type = TK_EOF; return OK; @@ -141,32 +141,32 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to r_token.type = TK_CURLY_BRACKET_OPEN; index++; return OK; - }; + } case '}': { r_token.type = TK_CURLY_BRACKET_CLOSE; index++; return OK; - }; + } case '[': { r_token.type = TK_BRACKET_OPEN; index++; return OK; - }; + } case ']': { r_token.type = TK_BRACKET_CLOSE; index++; return OK; - }; + } case ':': { r_token.type = TK_COLON; index++; return OK; - }; + } case ',': { r_token.type = TK_COMMA; index++; return OK; - }; + } case '"': { index++; String str; -- cgit v1.2.3