diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-09 17:08:36 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-04-09 17:09:48 +0200 |
commit | c8994b56f95c2623f60e48cd86d6e2368708e3ca (patch) | |
tree | 105363f3f3283eb691f44de640fcdad852c2ba1b /editor | |
parent | 4b2c79c4718f2f0b016069f0acba61df6d950fbd (diff) |
Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
Diffstat (limited to 'editor')
-rw-r--r-- | editor/collada/collada.cpp | 3 | ||||
-rw-r--r-- | editor/connections_dialog.cpp | 4 | ||||
-rw-r--r-- | editor/doc/doc_dump.cpp | 6 | ||||
-rw-r--r-- | editor/editor_node.cpp | 3 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 9 | ||||
-rw-r--r-- | editor/editor_properties_array_dict.cpp | 6 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 7 | ||||
-rw-r--r-- | editor/output_strings.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/animation_tree_player_editor_plugin.cpp | 15 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/baked_lightmap_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/mesh_library_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 9 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 21 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/project_settings_editor.cpp | 6 | ||||
-rw-r--r-- | editor/property_editor.cpp | 21 |
18 files changed, 88 insertions, 43 deletions
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index 94e6d4ded0..94a37a3118 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -166,7 +166,8 @@ Transform Collada::Node::compute_transform(Collada &state) const { } } break; - default: {} + default: { + } } xform = xform * xform_step; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index f775a0a14b..045158504a 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -160,7 +160,9 @@ void ConnectDialog::_add_bind() { case Variant::BASIS: value = Basis(); break; case Variant::TRANSFORM: value = Transform(); break; case Variant::COLOR: value = Color(); break; - default: { ERR_FAIL(); } break; + default: { + ERR_FAIL(); + } break; } ERR_FAIL_COND(value.get_type() == Variant::NIL); diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp index 1a68fe5bf2..6ccf0e26ea 100644 --- a/editor/doc/doc_dump.cpp +++ b/editor/doc/doc_dump.cpp @@ -199,7 +199,8 @@ void DocDump::dump(const String &p_file) { case Variant::ARRAY: case Variant::_RID: - default: {} + default: { + } } _write_string(f, 3, "<argument index=\"" + itos(i) + "\" name=\"" + _escape_string(arginfo.name) + "\" type=\"" + type_name + "\" default=\"" + _escape_string(default_arg_text) + "\">"); @@ -227,7 +228,8 @@ void DocDump::dump(const String &p_file) { } break; case PROPERTY_HINT_FILE: hint = "A file:"; break; - default: {} + default: { + } //case PROPERTY_HINT_RESOURCE_TYPE: hint="Type: "+arginfo.hint_string; break; }; if (hint != "") diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index c19b497ad5..8a67002503 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -924,7 +924,8 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool> ret_changed = true; } } break; - default: {} + default: { + } } } diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 0e8cd955b5..31f53305e2 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2883,7 +2883,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ case PROPERTY_HINT_LAYERS_3D_PHYSICS: lt = EditorPropertyLayers::LAYER_PHYSICS_3D; break; - default: {} //compiler could be smarter here and realize this can't happen + default: { + } //compiler could be smarter here and realize this can't happen } EditorPropertyLayers *editor = memnew(EditorPropertyLayers); editor->setup(lt); @@ -3020,7 +3021,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ case PROPERTY_HINT_PROPERTY_OF_BASE_TYPE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_BASE_TYPE; break; case PROPERTY_HINT_PROPERTY_OF_INSTANCE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_INSTANCE; break; case PROPERTY_HINT_PROPERTY_OF_SCRIPT: type = EditorPropertyMember::MEMBER_PROPERTY_OF_SCRIPT; break; - default: {} + default: { + } } editor->setup(type, p_hint_text); add_property_editor(p_path, editor); @@ -3284,7 +3286,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ editor->setup(Variant::POOL_COLOR_ARRAY); add_property_editor(p_path, editor); } break; - default: {} + default: { + } } return false; //can be overridden, although it will most likely be last anyway diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 0f6c6349ed..e3dc517a39 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -251,7 +251,8 @@ void EditorPropertyArray::update_property() { case Variant::POOL_COLOR_ARRAY: { arrtype = "PoolColorArray"; } break; - default: {} + default: { + } } if (array.get_type() == Variant::NIL) { @@ -862,7 +863,8 @@ void EditorPropertyDictionary::update_property() { editor->setup(Variant::POOL_COLOR_ARRAY); prop = editor; } break; - default: {} + default: { + } } if (i == amount) { diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index e6e29df133..daa423e1d9 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -581,7 +581,9 @@ int EditorSceneImporterGLTF::_get_component_type_size(int component_type) { case COMPONENT_TYPE_UNSIGNED_SHORT: return 2; break; case COMPONENT_TYPE_INT: return 4; break; case COMPONENT_TYPE_FLOAT: return 4; break; - default: { ERR_FAIL_V(0); } + default: { + ERR_FAIL_V(0); + } } return 0; } @@ -631,7 +633,8 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, int p element_size = 16; //override for this case } } break; - default: {} + default: { + } } Vector<double> dst_buffer; diff --git a/editor/output_strings.cpp b/editor/output_strings.cpp index 24b44f078f..baabaff9a8 100644 --- a/editor/output_strings.cpp +++ b/editor/output_strings.cpp @@ -105,7 +105,8 @@ void OutputStrings::_notification(int p_what) { case LINE_LINK: { } break; - default: {} + default: { + } } line_ofs.y += font->get_ascent(); diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp index e2a44069d9..e21ae4834d 100644 --- a/editor/plugins/animation_tree_player_editor_plugin.cpp +++ b/editor/plugins/animation_tree_player_editor_plugin.cpp @@ -200,7 +200,8 @@ void AnimationTreePlayerEditor::_edit_dialog_changed() { if (anim_tree->transition_node_get_current(edited_node) != edit_option->get_selected()) anim_tree->transition_node_set_current(edited_node, edit_option->get_selected()); } break; - default: {} + default: { + } } } @@ -457,7 +458,8 @@ void AnimationTreePlayerEditor::_popup_edit_dialog() { edit_dialog->set_size(Size2(150, 100)); } break; - default: {} + default: { + } } } @@ -555,7 +557,8 @@ void AnimationTreePlayerEditor::_draw_node(const StringName &p_node) { text += "->"; break; - default: {} + default: { + } } font->draw(ci, ofs + ascofs + Point2(3, 0), text, font_color); @@ -740,7 +743,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) { //open editor //_node_edit_property(click_node); } break; - default: {} + default: { + } } } if (mb->get_button_index() == 2) { @@ -817,7 +821,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) { anim_tree->node_set_position(click_node, new_pos); } break; - default: {} + default: { + } } click_type = CLICK_NONE; diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 6d2cdfc583..386bc1738e 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -454,7 +454,8 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) { progress->set_max(1); progress->set_value(0); } break; - default: {} + default: { + } } prev_status = cstatus; } @@ -612,7 +613,8 @@ void EditorAssetLibrary::_notification(int p_what) { case HTTPClient::STATUS_BODY: { load_status->set_value(0.4); } break; - default: {} + default: { + } } } diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp index d90ff95c1f..d75f06de12 100644 --- a/editor/plugins/baked_lightmap_editor_plugin.cpp +++ b/editor/plugins/baked_lightmap_editor_plugin.cpp @@ -50,7 +50,8 @@ void BakedLightmapEditorPlugin::_bake() { case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE: EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable.")); break; - default: {} + default: { + } } } } diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 89eb253afe..18586b2fe5 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -61,7 +61,8 @@ void MeshLibraryEditor::_menu_confirm() { _import_scene_cbk(existing); } break; - default: {}; + default: { + }; } } diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 0dbbaf4177..af43f679fd 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -905,7 +905,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) { bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y); } break; - default: {} + default: { + } } if (bone_painting) { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index f48887d342..ba297539d3 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1637,7 +1637,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { surface->update(); } break; - default: {} + default: { + } } } @@ -1704,7 +1705,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } break; - default: {} + default: { + } } } @@ -1760,7 +1762,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) { } break; - default: {} + default: { + } } } diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 5bc1067718..03277159fc 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -770,7 +770,8 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) { spin_z_index->show(); } } break; - default: {} + default: { + } } _update_toggle_shape_button(); workspace->update(); @@ -940,7 +941,8 @@ void TileSetEditor::_on_workspace_draw() { spin_z_index->set_value(tileset->autotile_get_z_index(get_current_tile(), edited_shape_coord)); draw_highlight_subtile(edited_shape_coord); } break; - default: {} + default: { + } } } @@ -1570,7 +1572,8 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { } } } break; - default: {} + default: { + } } } } @@ -1724,7 +1727,8 @@ void TileSetEditor::_on_tool_clicked(int p_tool) { undo_redo->commit_action(); } } break; - default: {} + default: { + } } } } else if (p_tool == TOOL_SELECT) { @@ -1894,7 +1898,8 @@ void TileSetEditor::_select_next_tile() { edited_shape_coord = Vector2(); _select_edited_shape_coord(); } break; - default: {} + default: { + } } } } @@ -1931,7 +1936,8 @@ void TileSetEditor::_select_previous_tile() { edited_shape_coord = cell_count; _select_edited_shape_coord(); } break; - default: {} + default: { + } } } } @@ -2668,7 +2674,8 @@ void TileSetEditor::draw_polygon_shapes() { } } } break; - default: {} + default: { + } } if (creating_shape) { diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index f71ff84bbe..0eeb104777 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -453,7 +453,8 @@ void VisualShaderEditor::_update_graph() { Vector3 v = default_value; button->set_text(String::num(v.x, 3) + "," + String::num(v.y, 3) + "," + String::num(v.z, 3)); } break; - default: {} + default: { + } } } diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index bb72c621be..2d7ad8bc04 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -294,7 +294,8 @@ void ProjectSettingsEditor::_device_input_add() { ie = jb; } break; - default: {} + default: { + } } if (idx < 0 || idx >= events.size()) { @@ -519,7 +520,8 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even } } break; - default: {} + default: { + } } } diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c45a97800c..4fa1bd74fe 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -310,7 +310,8 @@ void CustomPropertyEditor::_menu_option(int p_which) { } } break; - default: {} + default: { + } } } @@ -1049,7 +1050,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: case Variant::POOL_COLOR_ARRAY: { } break; - default: {} + default: { + } } updating = false; @@ -1091,7 +1093,8 @@ void CustomPropertyEditor::_file_selected(String p_file) { emit_signal("variant_changed"); hide(); } break; - default: {} + default: { + } } } @@ -1432,7 +1435,8 @@ void CustomPropertyEditor::_action_pressed(int p_which) { } break; - default: {}; + default: { + }; } } @@ -1699,7 +1703,8 @@ void CustomPropertyEditor::_modified(String p_string) { case Variant::POOL_COLOR_ARRAY: { } break; - default: {} + default: { + } } updating = false; @@ -1753,7 +1758,8 @@ void CustomPropertyEditor::_focus_enter() { } } } break; - default: {} + default: { + } } } @@ -1774,7 +1780,8 @@ void CustomPropertyEditor::_focus_exit() { value_editor[i]->select(0, 0); } } break; - default: {} + default: { + } } } |