diff options
author | hbina085 <hanif.ariffin.4326@gmail.com> | 2019-06-28 23:09:59 -0400 |
---|---|---|
committer | hbina085 <hanif.ariffin.4326@gmail.com> | 2019-06-29 16:08:48 -0400 |
commit | 9f0c6a60095025cb7f67a36ffa81e8709d645a66 (patch) | |
tree | 2d4419aaf70b84fe81e26dc9227ef6940437d217 /modules/gdscript | |
parent | 3942c939e3ed152d4cf9647411f34d1bc14cdec2 (diff) |
Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 6c77968f44..26b14a6148 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2498,7 +2498,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_IDENTIFIER: { _find_identifiers(context, is_function, options); } break; @@ -2537,7 +2538,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); if (node->type != GDScriptParser::Node::TYPE_OPERATOR) { @@ -3234,7 +3236,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol case GDScriptParser::COMPLETION_PARENT_FUNCTION: case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_IDENTIFIER: { if (!is_function) { @@ -3365,7 +3368,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); if (node->type != GDScriptParser::Node::TYPE_OPERATOR) { |