mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 20:24:41 +00:00
Replace FALLTHROUGH macro by C++17 [[fallthrough]]
This attribute is now part of the standard we target so we no longer need compiler-specific hacks. Also enables -Wimplicit-fallthrough for Clang now that we can properly support it. It's already on by default for GCC's -Wextra. Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
This commit is contained in:
parent
a7891b9d12
commit
2cf6ac6c50
25 changed files with 75 additions and 88 deletions
|
|
@ -2565,7 +2565,7 @@ 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);
|
||||
|
|
@ -2608,7 +2608,7 @@ 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();
|
||||
|
|
@ -3330,7 +3330,7 @@ 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: {
|
||||
|
||||
|
|
@ -3462,7 +3462,7 @@ 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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue