You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -340,7 +340,7 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const {
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case TK_OP_AND:
|
||||
case TK_OP_OR:
|
||||
break; // Don't get into default, since they can be non-literal
|
||||
@@ -536,7 +536,7 @@ void GDScriptTokenizerText::_advance() {
|
||||
ignore_warnings = true;
|
||||
}
|
||||
#endif // DEBUG_ENABLED
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
}
|
||||
case '\n': {
|
||||
line++;
|
||||
@@ -753,7 +753,7 @@ void GDScriptTokenizerText::_advance() {
|
||||
}
|
||||
INCPOS(1);
|
||||
is_string_name = true;
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
case '\'':
|
||||
case '"': {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user