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/variant_parser.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'core/variant_parser.cpp') diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 9fe98265dd..bdcad03353 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -110,7 +110,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri case '\n': { line++; break; - }; + } case 0: { r_token.type = TK_EOF; return OK; @@ -118,31 +118,31 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri case '{': { r_token.type = TK_CURLY_BRACKET_OPEN; return OK; - }; + } case '}': { r_token.type = TK_CURLY_BRACKET_CLOSE; return OK; - }; + } case '[': { r_token.type = TK_BRACKET_OPEN; return OK; - }; + } case ']': { r_token.type = TK_BRACKET_CLOSE; return OK; - }; + } case '(': { r_token.type = TK_PARENTHESIS_OPEN; return OK; - }; + } case ')': { r_token.type = TK_PARENTHESIS_CLOSE; return OK; - }; + } case ':': { r_token.type = TK_COLON; return OK; - }; + } case ';': { while (true) { CharType ch = p_stream->get_char(); @@ -156,19 +156,19 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri } break; - }; + } case ',': { r_token.type = TK_COMMA; return OK; - }; + } case '.': { r_token.type = TK_PERIOD; return OK; - }; + } case '=': { r_token.type = TK_EQUAL; return OK; - }; + } case '#': { StringBuffer<> color_str; color_str += '#'; @@ -189,7 +189,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri r_token.value = Color::html(color_str.as_string()); r_token.type = TK_COLOR; return OK; - }; + } case '@': { cchar = p_stream->get_char(); if (cchar != '"') { -- cgit v1.2.3