diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-23 08:43:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 08:43:18 +0100 |
commit | bd10c7045865bc7788f695b3ecc4fb136a499d87 (patch) | |
tree | 17b378d5698fe51bcd2e67aa648e704b29427b88 /editor | |
parent | 63b0d822d109f3612d5c22e4342ebef9cd3b9163 (diff) | |
parent | 2cf6ac6c507529884d6b8acfdc42f3bc1826b19d (diff) |
Merge pull request #36461 from akien-mga/c++17-fallthrough-attribute
Replace FALLTHROUGH macro by C++17 [[fallthrough]]
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/quick_open.cpp | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 413959bb99..d8043f016b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2178,7 +2178,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } - FALLTHROUGH; + [[fallthrough]]; } case SCENE_TAB_CLOSE: case FILE_SAVE_SCENE: { @@ -2199,7 +2199,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { break; } - FALLTHROUGH; + [[fallthrough]]; } case FILE_SAVE_AS_SCENE: { int scene_idx = (p_option == FILE_SAVE_SCENE || p_option == FILE_SAVE_AS_SCENE) ? -1 : tab_closing; diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index dfcaf5cdd2..f5cc0ccf2a 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3100,7 +3100,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_LEFT: case DRAG_BOTTOM_LEFT: _draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(node_pos_in_parent[0], Math::lerp(node_pos_in_parent[1], node_pos_in_parent[3], ratio)); end = start - Vector2(control->get_margin(MARGIN_LEFT), 0); @@ -3115,7 +3115,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_RIGHT: case DRAG_BOTTOM_RIGHT: _draw_margin_at_position(control->get_size().width, parent_transform.xform(Vector2((node_pos_in_parent[0] + node_pos_in_parent[2]) / 2, node_pos_in_parent[3])) + Vector2(0, 5), MARGIN_BOTTOM); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(node_pos_in_parent[2], Math::lerp(node_pos_in_parent[3], node_pos_in_parent[1], ratio)); end = start - Vector2(control->get_margin(MARGIN_RIGHT), 0); @@ -3130,7 +3130,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_TOP_LEFT: case DRAG_TOP_RIGHT: _draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2)) + Vector2(5, 0), MARGIN_RIGHT); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(Math::lerp(node_pos_in_parent[0], node_pos_in_parent[2], ratio), node_pos_in_parent[1]); end = start - Vector2(0, control->get_margin(MARGIN_TOP)); @@ -3145,7 +3145,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) { case DRAG_BOTTOM_LEFT: case DRAG_BOTTOM_RIGHT: _draw_margin_at_position(control->get_size().height, parent_transform.xform(Vector2(node_pos_in_parent[2], (node_pos_in_parent[1] + node_pos_in_parent[3]) / 2) + Vector2(5, 0)), MARGIN_RIGHT); - FALLTHROUGH; + [[fallthrough]]; case DRAG_MOVE: start = Vector2(Math::lerp(node_pos_in_parent[2], node_pos_in_parent[0], ratio), node_pos_in_parent[3]); end = start - Vector2(0, control->get_margin(MARGIN_BOTTOM)); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c0928ba79b..9dc98dc2a0 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -214,7 +214,7 @@ void ScriptEditorQuickOpen::_notification(int p_what) { connect_compat("confirmed", this, "_confirmed"); search_box->set_clear_button_enabled(true); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { search_box->set_right_icon(get_icon("Search", "EditorIcons")); @@ -900,7 +900,7 @@ void ScriptEditor::_file_dialog_action(String p_file) { } file->close(); memdelete(file); - FALLTHROUGH; + [[fallthrough]]; } case FILE_OPEN: { @@ -1396,7 +1396,7 @@ void ScriptEditor::_notification(int p_what) { script_split->connect_compat("dragged", this, "_script_split_dragged"); EditorSettings::get_singleton()->connect_compat("settings_changed", this, "_editor_settings_changed"); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 81f2a222da..c80ba873fb 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -234,7 +234,7 @@ void SpriteFramesEditor::_notification(int p_what) { _delete->set_icon(get_icon("Remove", "EditorIcons")); new_anim->set_icon(get_icon("New", "EditorIcons")); remove_anim->set_icon(get_icon("Remove", "EditorIcons")); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { splite_sheet_scroll->add_style_override("bg", get_stylebox("bg", "Tree")); diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index a7115fc9a2..10d00b2a1d 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -55,7 +55,7 @@ void TileMapEditor::_notification(int p_what) { if (is_visible_in_tree()) { _update_palette(); } - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_ENTER_TREE: { diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index 965c9abe75..57e3c1da70 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -260,7 +260,7 @@ void EditorQuickOpen::_notification(int p_what) { connect_compat("confirmed", this, "_confirmed"); search_box->set_clear_button_enabled(true); - FALLTHROUGH; + [[fallthrough]]; } case NOTIFICATION_THEME_CHANGED: { search_box->set_right_icon(get_icon("Search", "EditorIcons")); |