Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009
)
This commit is contained in:
parent
fc18d637a8
commit
8c2e10c393
|
@ -224,7 +224,8 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
|
|||
|
||||
string_cache[s] = tmpdata.size();
|
||||
|
||||
}; //fallthrough
|
||||
FALLTHROUGH;
|
||||
};
|
||||
case Variant::NIL:
|
||||
case Variant::BOOL:
|
||||
case Variant::INT:
|
||||
|
|
|
@ -61,8 +61,8 @@ void TileMapEditor::_notification(int p_what) {
|
|||
if (is_visible_in_tree()) {
|
||||
_update_palette();
|
||||
}
|
||||
|
||||
} // fallthrough
|
||||
FALLTHROUGH;
|
||||
}
|
||||
|
||||
case NOTIFICATION_ENTER_TREE: {
|
||||
|
||||
|
|
|
@ -2491,7 +2491,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
|
|||
} break;
|
||||
case GDScriptParser::COMPLETION_FUNCTION: {
|
||||
is_function = true;
|
||||
} // fallthrough
|
||||
FALLTHROUGH;
|
||||
}
|
||||
case GDScriptParser::COMPLETION_IDENTIFIER: {
|
||||
_find_identifiers(context, is_function, options);
|
||||
} break;
|
||||
|
@ -2530,7 +2531,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
|
|||
} 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) {
|
||||
|
@ -3227,7 +3229,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) {
|
||||
|
@ -3358,7 +3361,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) {
|
||||
|
|
|
@ -827,8 +827,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (wParam==VK_WIN) TODO wtf is this?
|
||||
meta_mem=uMsg==WM_KEYDOWN;
|
||||
*/
|
||||
|
||||
} //fallthrough
|
||||
FALLTHROUGH;
|
||||
}
|
||||
case WM_CHAR: {
|
||||
|
||||
ERR_BREAK(key_event_pos >= KEY_EVENT_BUFFER_SIZE);
|
||||
|
|
|
@ -184,7 +184,8 @@ void ParticlesMaterial::_update_shader() {
|
|||
} break;
|
||||
case EMISSION_SHAPE_DIRECTED_POINTS: {
|
||||
code += "uniform sampler2D emission_texture_normal : hint_black;\n";
|
||||
} //fallthrough
|
||||
FALLTHROUGH;
|
||||
}
|
||||
case EMISSION_SHAPE_POINTS: {
|
||||
code += "uniform sampler2D emission_texture_points : hint_black;\n";
|
||||
code += "uniform int emission_texture_point_count;\n";
|
||||
|
|
Loading…
Reference in New Issue