diff options
Diffstat (limited to 'editor')
75 files changed, 260 insertions, 260 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index e0839a9f27..6dcc9dd8ae 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -1076,7 +1076,7 @@ void AnimationBezierTrackEdit::duplicate_selection() { undo_redo->create_action(TTR("Anim Duplicate Keys")); - List<Pair<int, float> > new_selection_values; + List<Pair<int, float>> new_selection_values; for (Set<int>::Element *E = selection.back(); E; E = E->prev()) { @@ -1103,7 +1103,7 @@ void AnimationBezierTrackEdit::duplicate_selection() { //reselect duplicated selection.clear(); - for (List<Pair<int, float> >::Element *E = new_selection_values.front(); E; E = E->next()) { + for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) { int track = E->get().first; float time = E->get().second; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 095dbd6849..fb427afe24 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -752,7 +752,7 @@ public: if (animation != p_anim) return; - for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { for (List<float>::Element *F = E->value().front(); F; F = F->next()) { @@ -777,7 +777,7 @@ public: bool update_obj = false; bool change_notify_deserved = false; - for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); for (List<float>::Element *F = E->value().front(); F; F = F->next()) { @@ -1060,7 +1060,7 @@ public: bool _get(const StringName &p_name, Variant &r_ret) const { - for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); for (List<float>::Element *F = E->value().front(); F; F = F->next()) { @@ -1208,7 +1208,7 @@ public: bool show_time = true; bool same_track_type = true; bool same_key_type = true; - for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); ERR_FAIL_INDEX(track, animation->get_track_count()); @@ -1362,7 +1362,7 @@ public: Ref<Animation> animation; - Map<int, List<float> > key_ofs_map; + Map<int, List<float>> key_ofs_map; Map<int, NodePath> base_map; PropertyInfo hint; @@ -4892,7 +4892,7 @@ void AnimationTrackEditor::_update_key_edit() { multi_key_edit = memnew(AnimationMultiTrackKeyEdit); multi_key_edit->animation = animation; - Map<int, List<float> > key_ofs_map; + Map<int, List<float>> key_ofs_map; Map<int, NodePath> base_map; int first_track = -1; for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) { @@ -5186,7 +5186,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { undo_redo->create_action(TTR("Anim Duplicate Keys")); - List<Pair<int, float> > new_selection_values; + List<Pair<int, float>> new_selection_values; for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) { @@ -5224,7 +5224,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { //reselect duplicated Map<SelectedKey, KeyInfo> new_selection; - for (List<Pair<int, float> >::Element *E = new_selection_values.front(); E; E = E->next()) { + for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) { int track = E->get().first; float time = E->get().second; diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index 26f9c15f6c..8de56a153e 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -430,7 +430,7 @@ class AnimationTrackEditor : public VBoxContainer { Rect2 box_select_rect; void _scroll_input(const Ref<InputEvent> &p_event); - Vector<Ref<AnimationTrackEditPlugin> > track_edit_plugins; + Vector<Ref<AnimationTrackEditPlugin>> track_edit_plugins; void _cancel_bezier_edit(); void _bezier_edit(int p_for_track); diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index cf39abdc53..8ef9d17083 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -1773,12 +1773,12 @@ void Collada::_parse_animation(XMLParser &parser) { return; } - Map<String, Vector<float> > float_sources; - Map<String, Vector<String> > string_sources; + Map<String, Vector<float>> float_sources; + Map<String, Vector<String>> string_sources; Map<String, int> source_strides; - Map<String, Map<String, String> > samplers; - Map<String, Vector<String> > source_param_names; - Map<String, Vector<String> > source_param_types; + Map<String, Map<String, String>> samplers; + Map<String, Vector<String>> source_param_names; + Map<String, Vector<String>> source_param_types; String id = ""; if (parser.has_attribute("id")) diff --git a/editor/collada/collada.h b/editor/collada/collada.h index 10ed42260b..4707d7d779 100644 --- a/editor/collada/collada.h +++ b/editor/collada/collada.h @@ -570,8 +570,8 @@ public: Vector<AnimationClip> animation_clips; Vector<AnimationTrack> animation_tracks; - Map<String, Vector<int> > referenced_tracks; - Map<String, Vector<int> > by_id_tracks; + Map<String, Vector<int>> referenced_tracks; + Map<String, Vector<int>> by_id_tracks; float animation_length; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index eea92fb7ed..23df649851 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -977,7 +977,7 @@ void ConnectionsDock::update_tree() { String descr; bool found = false; - Map<StringName, Map<StringName, String> >::Element *G = descr_cache.find(base); + Map<StringName, Map<StringName, String>>::Element *G = descr_cache.find(base); if (G) { Map<StringName, String>::Element *F = G->get().find(signal_name); if (F) { diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index 988a8a1271..8f29a4f720 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -173,7 +173,7 @@ class ConnectionsDock : public VBoxContainer { PopupMenu *slot_menu; UndoRedo *undo_redo; - Map<StringName, Map<StringName, String> > descr_cache; + Map<StringName, Map<StringName, String>> descr_cache; void _make_or_edit_connection(); void _connect(ConnectDialog::ConnectionData cToMake); diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp index 441f6082c3..019a5d0fc3 100644 --- a/editor/debugger/editor_debugger_tree.cpp +++ b/editor/debugger/editor_debugger_tree.cpp @@ -132,7 +132,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter(); // Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion. - List<Pair<TreeItem *, int> > parents; + List<Pair<TreeItem *, int>> parents; for (int i = 0; i < p_tree->nodes.size(); i++) { TreeItem *parent = NULL; if (parents.size()) { // Find last parent. diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp index 2f3ad210b2..ca4979563d 100644 --- a/editor/debugger/editor_profiler.cpp +++ b/editor/debugger/editor_profiler.cpp @@ -611,8 +611,8 @@ bool EditorProfiler::is_profiling() { return activate->is_pressed(); } -Vector<Vector<String> > EditorProfiler::get_data_as_csv() const { - Vector<Vector<String> > res; +Vector<Vector<String>> EditorProfiler::get_data_as_csv() const { + Vector<Vector<String>> res; if (frame_metrics.empty()) { return res; diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h index 0a442ddd5c..4afd2c8302 100644 --- a/editor/debugger/editor_profiler.h +++ b/editor/debugger/editor_profiler.h @@ -169,7 +169,7 @@ public: void clear(); - Vector<Vector<String> > get_data_as_csv() const; + Vector<Vector<String>> get_data_as_csv() const; EditorProfiler(); }; diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index 52aa418922..48425062d1 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -678,8 +678,8 @@ bool EditorVisualProfiler::is_profiling() { return activate->is_pressed(); } -Vector<Vector<String> > EditorVisualProfiler::get_data_as_csv() const { - Vector<Vector<String> > res; +Vector<Vector<String>> EditorVisualProfiler::get_data_as_csv() const { + Vector<Vector<String>> res; #if 0 if (frame_metrics.empty()) { return res; diff --git a/editor/debugger/editor_visual_profiler.h b/editor/debugger/editor_visual_profiler.h index 5194c08b96..d3a758557c 100644 --- a/editor/debugger/editor_visual_profiler.h +++ b/editor/debugger/editor_visual_profiler.h @@ -146,7 +146,7 @@ public: void clear(); - Vector<Vector<String> > get_data_as_csv() const; + Vector<Vector<String>> get_data_as_csv() const; EditorVisualProfiler(); }; diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 3d567ed2b3..d7c0c3d2bf 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -165,7 +165,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) { file->store_csv_line(line); // values - List<Vector<float> >::Element *E = perf_history.back(); + List<Vector<float>>::Element *E = perf_history.back(); while (E) { Vector<float> &perf_data = E->get(); @@ -178,7 +178,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) { } file->store_string("\n"); - Vector<Vector<String> > profiler_data = profiler->get_data_as_csv(); + Vector<Vector<String>> profiler_data = profiler->get_data_as_csv(); for (int i = 0; i < profiler_data.size(); i++) { file->store_csv_line(profiler_data[i]); } @@ -728,7 +728,7 @@ void ScriptEditorDebugger::_performance_draw() { float spacing = point_sep / float(cols); float from = r.size.width; - List<Vector<float> >::Element *E = perf_history.front(); + List<Vector<float>>::Element *E = perf_history.front(); float prev = -1; while (from >= 0 && E) { diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index e7ce917543..7944d7cb99 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -109,7 +109,7 @@ private: // Each debugger should have it's tree in the future I guess. const Tree *editor_remote_tree = NULL; - List<Vector<float> > perf_history; + List<Vector<float>> perf_history; Vector<float> perf_max; Vector<TreeItem *> perf_items; diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 0c95a64d06..5a0accd45c 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -63,7 +63,7 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) { search->popup_centered_ratio(0.65); // So it doesn't completely cover the dialog below it. } -void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String> > &candidates) { +void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates) { for (int i = 0; i < efsd->get_subdir_count(); i++) { _fix_and_find(efsd->get_subdir(i), candidates); @@ -124,7 +124,7 @@ void DependencyEditor::_fix_all() { if (!EditorFileSystem::get_singleton()->get_filesystem()) return; - Map<String, Map<String, String> > candidates; + Map<String, Map<String, String>> candidates; for (List<String>::Element *E = missing.front(); E; E = E->next()) { @@ -140,7 +140,7 @@ void DependencyEditor::_fix_all() { Map<String, String> remaps; - for (Map<String, Map<String, String> >::Element *E = candidates.front(); E; E = E->next()) { + for (Map<String, Map<String, String>>::Element *E = candidates.front(); E; E = E->next()) { for (Map<String, String>::Element *F = E->get().front(); F; F = F->next()) { diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index be8d34f406..ee74072731 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -52,7 +52,7 @@ class DependencyEditor : public AcceptDialog { String editing; List<String> missing; - void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String> > &candidates); + void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates); void _searched(const String &p_path); void _load_pressed(Object *p_item, int p_cell, int p_button); diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 38ff9cd5fc..66134b4428 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -687,10 +687,10 @@ void DocData::generate(bool p_basic_types) { c.methods.push_back(md); } - List<Pair<String, Variant> > cinfo; + List<Pair<String, Variant>> cinfo; lang->get_public_constants(&cinfo); - for (List<Pair<String, Variant> >::Element *E = cinfo.front(); E; E = E->next()) { + for (List<Pair<String, Variant>>::Element *E = cinfo.front(); E; E = E->next()) { ConstantDoc cd; cd.name = E->get().first; diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 73c70f422d..e26d44025f 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -110,7 +110,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { ret = unzGoToNextFile(pkg); } - Map<String, Ref<Texture2D> > extension_guess; + Map<String, Ref<Texture2D>> extension_guess; { extension_guess["png"] = get_icon("ImageTexture", "EditorIcons"); extension_guess["jpg"] = get_icon("ImageTexture", "EditorIcons"); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 192e7d286f..1c19327da7 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -521,7 +521,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i void EditorData::remove_custom_type(const String &p_type) { - for (Map<String, Vector<CustomType> >::Element *E = custom_types.front(); E; E = E->next()) { + for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) { for (int i = 0; i < E->get().size(); i++) { if (E->get()[i].name == p_type) { diff --git a/editor/editor_data.h b/editor/editor_data.h index 8a6f2f63f6..5095ea8479 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -135,7 +135,7 @@ private: String name; Variant value; }; - Map<String, Vector<CustomType> > custom_types; + Map<String, Vector<CustomType>> custom_types; List<PropertyData> clipboard; UndoRedo undo_redo; @@ -181,7 +181,7 @@ public: void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon); Object *instance_custom_type(const String &p_type, const String &p_inherits); void remove_custom_type(const String &p_type); - const Map<String, Vector<CustomType> > &get_custom_types() const { return custom_types; } + const Map<String, Vector<CustomType>> &get_custom_types() const { return custom_types; } int add_edited_scene(int p_at_pos); void move_edited_scene_index(int p_idx, int p_to_idx); diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 4941f295d7..5883b5eb1e 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -664,7 +664,7 @@ EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_contai EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) { FeatureContainers features = p_platform.get_feature_containers(p_preset); - Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins(); + Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins(); //initial export plugin callback for (int i = 0; i < export_plugins.size(); i++) { if (export_plugins[i]->get_script_instance()) { //script based @@ -676,7 +676,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla } EditorExportPlatform::ExportNotifier::~ExportNotifier() { - Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins(); + Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins(); for (int i = 0; i < export_plugins.size(); i++) { if (export_plugins[i]->get_script_instance()) { export_plugins.write[i]->_export_end_script(); @@ -712,7 +712,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> & _edit_filter_list(paths, p_preset->get_include_filter(), false); _edit_filter_list(paths, p_preset->get_exclude_filter(), true); - Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins(); + Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins(); for (int i = 0; i < export_plugins.size(); i++) { export_plugins.write[i]->set_export_preset(p_preset); @@ -1284,7 +1284,7 @@ void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin) export_plugins.erase(p_plugin); } -Vector<Ref<EditorExportPlugin> > EditorExport::get_export_plugins() { +Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() { return export_plugins; } diff --git a/editor/editor_export.h b/editor/editor_export.h index 139d672cb8..81790eb0a4 100644 --- a/editor/editor_export.h +++ b/editor/editor_export.h @@ -347,9 +347,9 @@ public: class EditorExport : public Node { GDCLASS(EditorExport, Node); - Vector<Ref<EditorExportPlatform> > export_platforms; - Vector<Ref<EditorExportPreset> > export_presets; - Vector<Ref<EditorExportPlugin> > export_plugins; + Vector<Ref<EditorExportPlatform>> export_platforms; + Vector<Ref<EditorExportPreset>> export_presets; + Vector<Ref<EditorExportPlugin>> export_plugins; Timer *save_timer; bool block_save; @@ -379,7 +379,7 @@ public: void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin); void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin); - Vector<Ref<EditorExportPlugin> > get_export_plugins(); + Vector<Ref<EditorExportPlugin>> get_export_plugins(); void load_config(); diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp index 959507535b..4b0bbdcec2 100644 --- a/editor/editor_feature_profile.cpp +++ b/editor/editor_feature_profile.cpp @@ -153,7 +153,7 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) { Array dis_props; - for (Map<StringName, Set<StringName> >::Element *E = disabled_properties.front(); E; E = E->next()) { + for (Map<StringName, Set<StringName>>::Element *E = disabled_properties.front(); E; E = E->next()) { for (Set<StringName>::Element *F = E->get().front(); F; F = F->next()) { dis_props.push_back(String(E->key()) + ":" + String(F->get())); } diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h index a5ab73da60..5ae2398027 100644 --- a/editor/editor_feature_profile.h +++ b/editor/editor_feature_profile.h @@ -58,7 +58,7 @@ public: private: Set<StringName> disabled_classes; Set<StringName> disabled_editors; - Map<StringName, Set<StringName> > disabled_properties; + Map<StringName, Set<StringName>> disabled_properties; bool features_disabled[FEATURE_MAX]; static const char *feature_names[FEATURE_MAX]; diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index b5ec08ef60..ad34b59c5c 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1558,7 +1558,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector String importer_name; - Map<String, Map<StringName, Variant> > source_file_options; + Map<String, Map<StringName, Variant>> source_file_options; Map<String, String> base_paths; for (int i = 0; i < p_files.size(); i++) { @@ -1610,7 +1610,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Error err = importer->import_group_file(p_group_file, source_file_options, base_paths); //all went well, overwrite config files with proper remaps and md5s - for (Map<String, Map<StringName, Variant> >::Element *E = source_file_options.front(); E; E = E->next()) { + for (Map<String, Map<StringName, Variant>>::Element *E = source_file_options.front(); E; E = E->next()) { const String &file = E->key(); String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file); @@ -1921,7 +1921,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) { EditorResourcePreview::get_singleton()->check_for_invalidation(p_file); } -void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport) { +void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport) { int fc = efd->files.size(); const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr(); @@ -1998,9 +1998,9 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { //reimport groups if (groups_to_reimport.size()) { - Map<String, Vector<String> > group_files; + Map<String, Vector<String>> group_files; _find_group_files(filesystem, group_files, groups_to_reimport); - for (Map<String, Vector<String> >::Element *E = group_files.front(); E; E = E->next()) { + for (Map<String, Vector<String>>::Element *E = group_files.front(); E; E = E->next()) { Error err = _reimport_group(E->key(), E->get()); if (err == OK) { diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 381acc0fe2..9789dacdc1 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -240,7 +240,7 @@ class EditorFileSystem : public Node { bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time) - void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport); + void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport); void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index b26fa77e16..4526a3a52c 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -812,7 +812,7 @@ void EditorHelp::_update_doc() { // Constants and enums if (cd.constants.size()) { - Map<String, Vector<DocData::ConstantDoc> > enums; + Map<String, Vector<DocData::ConstantDoc>> enums; Vector<DocData::ConstantDoc> constants; for (int i = 0; i < cd.constants.size(); i++) { @@ -842,7 +842,7 @@ void EditorHelp::_update_doc() { class_desc->add_newline(); - for (Map<String, Vector<DocData::ConstantDoc> >::Element *E = enums.front(); E; E = E->next()) { + for (Map<String, Vector<DocData::ConstantDoc>>::Element *E = enums.front(); E; E = E->next()) { enum_line[E->key()] = class_desc->get_line_count() - 2; @@ -1188,7 +1188,7 @@ void EditorHelp::_help_callback(const String &p_topic) { if (constant_line.has(name)) line = constant_line[name]; else { - Map<String, Map<String, int> >::Element *iter = enum_values_line.front(); + Map<String, Map<String, int>>::Element *iter = enum_values_line.front(); while (true) { if (iter->value().has(name)) { line = iter->value()[name]; @@ -1489,8 +1489,8 @@ void EditorHelp::go_to_class(const String &p_class, int p_scroll) { _goto_desc(p_class, p_scroll); } -Vector<Pair<String, int> > EditorHelp::get_sections() { - Vector<Pair<String, int> > sections; +Vector<Pair<String, int>> EditorHelp::get_sections() { + Vector<Pair<String, int>> sections; for (int i = 0; i < section_line.size(); i++) { sections.push_back(Pair<String, int>(section_line[i].first, i)); diff --git a/editor/editor_help.h b/editor/editor_help.h index 83c279aec3..a690e10e7e 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -108,14 +108,14 @@ class EditorHelp : public VBoxContainer { String edited_class; - Vector<Pair<String, int> > section_line; + Vector<Pair<String, int>> section_line; Map<String, int> method_line; Map<String, int> signal_line; Map<String, int> property_line; Map<String, int> theme_property_line; Map<String, int> constant_line; Map<String, int> enum_line; - Map<String, Map<String, int> > enum_values_line; + Map<String, Map<String, int>> enum_values_line; int description_line; RichTextLabel *class_desc; @@ -175,7 +175,7 @@ public: void go_to_help(const String &p_help); void go_to_class(const String &p_class, int p_scroll = 0); - Vector<Pair<String, int> > get_sections(); + Vector<Pair<String, int>> get_sections(); void scroll_to_section(int p_section_index); void popup_search(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index ed5a411d8b..a7540bad10 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1454,7 +1454,7 @@ void EditorInspector::update_tree() { if (!object) return; - List<Ref<EditorInspectorPlugin> > valid_plugins; + List<Ref<EditorInspectorPlugin>> valid_plugins; for (int i = inspector_plugin_count - 1; i >= 0; i--) { //start by last, so lastly added can override newly added if (!inspector_plugins[i]->can_handle(object)) @@ -1490,7 +1490,7 @@ void EditorInspector::update_tree() { Color sscolor = get_color("prop_subsection", "Editor"); - for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) { + for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) { Ref<EditorInspectorPlugin> ped = E->get(); ped->parse_begin(object); _parse_added_editors(main_vbox, ped); @@ -1557,7 +1557,7 @@ void EditorInspector::update_tree() { category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2])); } - for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) { + for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) { Ref<EditorInspectorPlugin> ped = E->get(); ped->parse_category(object, p.name); _parse_added_editors(main_vbox, ped); @@ -1688,7 +1688,7 @@ void EditorInspector::update_tree() { String descr; bool found = false; - Map<StringName, Map<StringName, String> >::Element *E = descr_cache.find(classname); + Map<StringName, Map<StringName, String>>::Element *E = descr_cache.find(classname); if (E) { Map<StringName, String>::Element *F = E->get().find(propname); if (F) { @@ -1719,7 +1719,7 @@ void EditorInspector::update_tree() { doc_hint = descr; } - for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) { + for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) { Ref<EditorInspectorPlugin> ped = E->get(); bool exclusive = ped->parse_property(object, p.type, p.name, p.hint, p.hint_string, p.usage); @@ -1802,7 +1802,7 @@ void EditorInspector::update_tree() { } } - for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) { + for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) { Ref<EditorInspectorPlugin> ped = E->get(); ped->parse_end(); _parse_added_editors(main_vbox, ped); @@ -1933,7 +1933,7 @@ void EditorInspector::collapse_all_folding() { E->get()->fold(); } - for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) { + for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) { E->get()->collapse_all_folding(); } @@ -1944,7 +1944,7 @@ void EditorInspector::expand_all_folding() { for (List<EditorInspectorSection *>::Element *E = sections.front(); E; E = E->next()) { E->get()->unfold(); } - for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) { + for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) { E->get()->expand_all_folding(); } @@ -2154,7 +2154,7 @@ void EditorInspector::_property_selected(const String &p_path, int p_focusable) property_selected = p_path; property_focusable = p_focusable; //deselect the others - for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) { + for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { if (F->key() == property_selected) continue; for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) { @@ -2217,7 +2217,7 @@ void EditorInspector::_notification(int p_what) { if (refresh_countdown > 0) { refresh_countdown -= get_process_delta_time(); if (refresh_countdown <= 0) { - for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) { + for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) { for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) { E->get()->update_property(); E->get()->update_reload_status(); diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 7a1542d30f..b49a4424f6 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -261,7 +261,7 @@ class EditorInspector : public ScrollContainer { VBoxContainer *main_vbox; //map use to cache the instanced editors - Map<StringName, List<EditorProperty *> > editor_property_map; + Map<StringName, List<EditorProperty *>> editor_property_map; List<EditorInspectorSection *> sections; Set<StringName> pending; @@ -291,7 +291,7 @@ class EditorInspector : public ScrollContainer { int property_focusable; int update_scroll_request; - Map<StringName, Map<StringName, String> > descr_cache; + Map<StringName, Map<StringName, String>> descr_cache; Map<StringName, String> class_descr_cache; Set<StringName> restart_request_props; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 323684effe..16f6883b31 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -547,7 +547,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam void EditorNode::_resources_changed(const Vector<String> &p_resources) { - List<Ref<Resource> > changed; + List<Ref<Resource>> changed; int rc = p_resources.size(); for (int i = 0; i < rc; i++) { @@ -573,7 +573,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) { } if (changed.size()) { - for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) { + for (List<Ref<Resource>>::Element *E = changed.front(); E; E = E->next()) { E->get()->reload_from_file(); } } @@ -1210,7 +1210,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod return false; } -static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource> > &edited_resources) { +static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) { if (p_resource->is_edited()) { edited_resources.insert(p_resource); @@ -1247,11 +1247,11 @@ int EditorNode::_save_external_resources() { flg |= ResourceSaver::FLAG_COMPRESS; flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; - Set<Ref<Resource> > edited_subresources; + Set<Ref<Resource>> edited_subresources; int saved = 0; - List<Ref<Resource> > cached; + List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); - for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) { + for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) { Ref<Resource> res = E->get(); if (!res->get_path().is_resource_file()) @@ -1266,7 +1266,7 @@ int EditorNode::_save_external_resources() { // clear later, because user may have put the same subresource in two different resources, // which will be shared until the next reload - for (Set<Ref<Resource> >::Element *E = edited_subresources.front(); E; E = E->next()) { + for (Set<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) { Ref<Resource> res = E->get(); res->set_edited(false); } @@ -3333,7 +3333,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b dependency_errors.erase(lpath); //at least not self path - for (Map<String, Set<String> >::Element *E = dependency_errors.front(); E; E = E->next()) { + for (Map<String, Set<String>>::Element *E = dependency_errors.front(); E; E = E->next()) { String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n"; for (Set<String>::Element *F = E->get().front(); F; F = F->next()) { @@ -3787,8 +3787,8 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p return icon; } - const Map<String, Vector<EditorData::CustomType> > &p_map = EditorNode::get_editor_data().get_custom_types(); - for (const Map<String, Vector<EditorData::CustomType> >::Element *E = p_map.front(); E; E = E->next()) { + const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types(); + for (const Map<String, Vector<EditorData::CustomType>>::Element *E = p_map.front(); E; E = E->next()) { const Vector<EditorData::CustomType> &ct = E->value(); for (int i = 0; i < ct.size(); ++i) { if (ct[i].name == p_class) { @@ -5120,10 +5120,10 @@ void EditorNode::reload_scene(const String &p_path) { //first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk - List<Ref<Resource> > cached; + List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); - List<Ref<Resource> > to_clear; //clear internal resources from previous scene from being used - for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) { + List<Ref<Resource>> to_clear; //clear internal resources from previous scene from being used + for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) { if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene to_clear.push_back(E->get()); @@ -5254,9 +5254,9 @@ void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConve resource_conversion_plugins.erase(p_plugin); } -Vector<Ref<EditorResourceConversionPlugin> > EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) { +Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) { - Vector<Ref<EditorResourceConversionPlugin> > ret; + Vector<Ref<EditorResourceConversionPlugin>> ret; for (int i = 0; i < resource_conversion_plugins.size(); i++) { if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) { diff --git a/editor/editor_node.h b/editor/editor_node.h index e2badff88d..bd285db224 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -513,7 +513,7 @@ private: Set<FileDialog *> file_dialogs; Set<EditorFileDialog *> editor_file_dialogs; - Map<String, Ref<Texture2D> > icon_type_cache; + Map<String, Ref<Texture2D>> icon_type_cache; void _build_icon_type_cache(); bool _initializing_addons; @@ -536,7 +536,7 @@ private: void _find_node_types(Node *p_node, int &count_2d, int &count_3d); void _save_scene_with_preview(String p_file, int p_idx = -1); - Map<String, Set<String> > dependency_errors; + Map<String, Set<String>> dependency_errors; static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) { EditorNode *en = (EditorNode *)ud; @@ -622,7 +622,7 @@ private: void _update_update_spinner(); - Vector<Ref<EditorResourceConversionPlugin> > resource_conversion_plugins; + Vector<Ref<EditorResourceConversionPlugin>> resource_conversion_plugins; PrintHandlerList print_handler; static void _print_handler(void *p_this, const String &p_string, bool p_error); @@ -844,7 +844,7 @@ public: void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin); void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin); - Vector<Ref<EditorResourceConversionPlugin> > find_resource_conversion_plugin(const Ref<Resource> &p_for_resource); + Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin(const Ref<Resource> &p_for_resource); static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); } static void add_build_callback(EditorBuildCallback p_callback); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 10ecdb19c0..5204a4d579 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -45,13 +45,13 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) { - Vector<Ref<Mesh> > meshes; + Vector<Ref<Mesh>> meshes; for (int i = 0; i < p_meshes.size(); i++) { meshes.push_back(p_meshes[i]); } - Vector<Ref<Texture2D> > textures = make_mesh_previews(meshes, NULL, p_preview_size); + Vector<Ref<Texture2D>> textures = make_mesh_previews(meshes, NULL, p_preview_size); Array ret; for (int i = 0; i < textures.size(); i++) { ret.push_back(textures[i]); @@ -60,7 +60,7 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_ return ret; } -Vector<Ref<Texture2D> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) { +Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) { int size = p_preview_size; @@ -86,7 +86,7 @@ Vector<Ref<Texture2D> > EditorInterface::make_mesh_previews(const Vector<Ref<Mes EditorProgress ep("mlib", TTR("Creating Mesh Previews"), p_meshes.size()); - Vector<Ref<Texture2D> > textures; + Vector<Ref<Texture2D>> textures; for (int i = 0; i < p_meshes.size(); i++) { diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index dee63e4322..0313ef2b26 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -98,7 +98,7 @@ public: Error save_scene(); void save_scene_as(const String &p_scene, bool p_with_preview = true); - Vector<Ref<Texture2D> > make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, Vector<Transform> *p_transforms, int p_preview_size); + Vector<Ref<Texture2D>> make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size); void set_main_screen_editor(const String &p_name); void set_distraction_free_mode(bool p_enter); diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 9ff34f8fb4..9a474ed4af 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2121,7 +2121,7 @@ void EditorPropertyResource::_menu_option(int p_which) { List<PropertyInfo> property_list; res_orig->get_property_list(&property_list); - List<Pair<String, Variant> > propvalues; + List<Pair<String, Variant>> propvalues; for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) { @@ -2144,7 +2144,7 @@ void EditorPropertyResource::_menu_option(int p_which) { ERR_FAIL_COND(res.is_null()); - for (List<Pair<String, Variant> >::Element *E = propvalues.front(); E; E = E->next()) { + for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) { Pair<String, Variant> &p = E->get(); res->set(p.first, p.second); @@ -2206,7 +2206,7 @@ void EditorPropertyResource::_menu_option(int p_which) { int to_type = p_which - CONVERT_BASE_ID; - Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res); + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res); ERR_FAIL_INDEX(to_type, conversions.size()); @@ -2438,7 +2438,7 @@ void EditorPropertyResource::_update_menu_items() { if (!res.is_null()) { - Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res); + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res); if (conversions.size()) { menu->add_separator(); } diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index 0e1684963c..dc5a3b9c93 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -94,7 +94,7 @@ class EditorResourcePreview : public Node { static void _thread_func(void *ud); void _thread(); - Vector<Ref<EditorResourcePreviewGenerator> > preview_generators; + Vector<Ref<EditorResourcePreviewGenerator>> preview_generators; protected: static void _bind_methods(); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index ae16a50279..3f54761c15 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -125,7 +125,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const { if (p_name.operator String() == "shortcuts") { Array arr; - for (const Map<String, Ref<ShortCut> >::Element *E = shortcuts.front(); E; E = E->next()) { + for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) { Ref<ShortCut> sc = E->get(); @@ -1476,7 +1476,7 @@ void EditorSettings::add_shortcut(const String &p_name, Ref<ShortCut> &p_shortcu bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const { - const Map<String, Ref<ShortCut> >::Element *E = shortcuts.find(p_name); + const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name); ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + "."); return E->get()->is_shortcut(p_event); @@ -1484,7 +1484,7 @@ bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_ Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const { - const Map<String, Ref<ShortCut> >::Element *E = shortcuts.find(p_name); + const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name); if (!E) return Ref<ShortCut>(); @@ -1493,7 +1493,7 @@ Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const { void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) { - for (const Map<String, Ref<ShortCut> >::Element *E = shortcuts.front(); E; E = E->next()) { + for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) { r_shortcuts->push_back(E->key()); } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index d4dd19ee10..29b89ef1a8 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -95,7 +95,7 @@ private: int last_order; Ref<Resource> clipboard; - Map<String, Ref<ShortCut> > shortcuts; + Map<String, Ref<ShortCut>> shortcuts; String resource_path; String settings_dir; diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 6c69f46941..e9e1b3be43 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1085,10 +1085,10 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const { // Rename all resources loaded, be it subresources or actual resources. - List<Ref<Resource> > cached; + List<Ref<Resource>> cached; ResourceCache::get_cached_resources(&cached); - for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) { + for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) { Ref<Resource> r = E->get(); String base_path = r->get_path(); diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 2f97f4aa31..3cc6e7a50c 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -49,7 +49,7 @@ struct ColladaImport { Collada collada; Spatial *scene; - Vector<Ref<Animation> > animations; + Vector<Ref<Animation>> animations; struct NodeMap { //String path; @@ -73,12 +73,12 @@ struct ColladaImport { Map<String, NodeMap> node_map; //map from collada node to engine node Map<String, String> node_name_map; //map from collada node to engine node - Map<String, Ref<ArrayMesh> > mesh_cache; - Map<String, Ref<Curve3D> > curve_cache; - Map<String, Ref<Material> > material_cache; + Map<String, Ref<ArrayMesh>> mesh_cache; + Map<String, Ref<Curve3D>> curve_cache; + Map<String, Ref<Material>> material_cache; Map<Collada::Node *, Skeleton *> skeleton_map; - Map<Skeleton *, Map<String, int> > skeleton_bone_map; + Map<Skeleton *, Map<String, int>> skeleton_bone_map; Set<String> valid_animated_nodes; Vector<int> valid_animated_properties; @@ -89,7 +89,7 @@ struct ColladaImport { Error _create_scene(Collada::Node *p_node, Spatial *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes = Vector<Ref<ArrayMesh> >(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes = Vector<Ref<ArrayMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks); @@ -489,7 +489,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; @@ -608,7 +608,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me /* ADD WEIGHTS IF EXIST */ /************************/ - Map<int, Vector<Collada::Vertex::Weight> > pre_weights; + Map<int, Vector<Collada::Vertex::Weight>> pre_weights; bool has_weights = false; @@ -1096,7 +1096,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres String meshid; Transform apply_xform; Vector<int> bone_remap; - Vector<Ref<ArrayMesh> > morphs; + Vector<Ref<ArrayMesh>> morphs; if (ng2->controller) { @@ -1173,7 +1173,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh)); const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2]; mesh->set_name(meshdata.name); - Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh> >(), false); + Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh>>(), false); ERR_FAIL_COND_V(err, err); morphs.push_back(mesh); diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 731d094745..398fc9ff49 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -1838,7 +1838,7 @@ Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) { skeleton_sets.get_representatives(groups_representatives); Vector<GLTFNodeIndex> highest_group_members; - Vector<Vector<GLTFNodeIndex> > groups; + Vector<Vector<GLTFNodeIndex>> groups; for (int i = 0; i < groups_representatives.size(); ++i) { Vector<GLTFNodeIndex> group; skeleton_sets.get_members(group, groups_representatives[i]); diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h index 5d2711483b..9f354fde2d 100644 --- a/editor/import/editor_scene_importer_gltf.h +++ b/editor/import/editor_scene_importer_gltf.h @@ -284,7 +284,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { Channel<Vector3> translation_track; Channel<Quat> rotation_track; Channel<Vector3> scale_track; - Vector<Channel<float> > weight_tracks; + Vector<Channel<float>> weight_tracks; }; String name; @@ -302,18 +302,18 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { bool use_named_skin_binds; Vector<GLTFNode *> nodes; - Vector<Vector<uint8_t> > buffers; + Vector<Vector<uint8_t>> buffers; Vector<GLTFBufferView> buffer_views; Vector<GLTFAccessor> accessors; Vector<GLTFMesh> meshes; //meshes are loaded directly, no reason not to. - Vector<Ref<Material> > materials; + Vector<Ref<Material>> materials; String scene_name; Vector<int> root_nodes; Vector<GLTFTexture> textures; - Vector<Ref<Texture2D> > images; + Vector<Ref<Texture2D>> images; Vector<GLTFSkin> skins; Vector<GLTFCamera> cameras; diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 3119fb088b..1d7bed3975 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -96,7 +96,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR); Vector<String> locales; - Vector<Ref<Translation> > translations; + Vector<Ref<Translation>> translations; for (int i = 1; i < line.size(); i++) { diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 7fd3bcc478..fb1782cb65 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -42,7 +42,7 @@ uint32_t EditorOBJImporter::get_import_flags() const { return IMPORT_SCENE; } -static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D> > &material_map, List<String> *r_missing_deps) { +static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { FileAccessRef f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path)); @@ -203,7 +203,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand return OK; } -static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) { +static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) { FileAccessRef f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path)); @@ -221,7 +221,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p Vector<Vector2> uvs; String name; - Map<String, Map<String, Ref<StandardMaterial3D> > > material_map; + Map<String, Map<String, Ref<StandardMaterial3D>>> material_map; Ref<SurfaceTool> surf_tool = memnew(SurfaceTool); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -397,7 +397,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { - Map<String, Ref<StandardMaterial3D> > lib; + Map<String, Ref<StandardMaterial3D>> lib; Error err = _parse_material_library(current_material_library, lib, r_missing_deps); if (err == ERR_CANT_OPEN) { String dir = p_path.get_base_dir(); @@ -420,7 +420,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { - List<Ref<Mesh> > meshes; + List<Ref<Mesh>> meshes; Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, p_flags & IMPORT_USE_COMPRESSION, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps); @@ -433,7 +433,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in Spatial *scene = memnew(Spatial); - for (List<Ref<Mesh> >::Element *E = meshes.front(); E; E = E->next()) { + for (List<Ref<Mesh>>::Element *E = meshes.front(); E; E = E->next()) { MeshInstance *mi = memnew(MeshInstance); mi->set_mesh(E->get()); @@ -500,7 +500,7 @@ bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Ma Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { - List<Ref<Mesh> > meshes; + List<Ref<Mesh>> meshes; Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], NULL); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 5651197fa3..94a6fee6b7 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -170,7 +170,7 @@ String ResourceImporterScene::get_visible_name() const { void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const { - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { E->get()->get_extensions(p_extensions); } } @@ -276,7 +276,7 @@ static String _fixstr(const String &p_what, const String &p_str) { return what; } -static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_list, bool p_convex) { +static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape>> &r_shape_list, bool p_convex) { if (!p_convex) { @@ -284,7 +284,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li r_shape_list.push_back(shape); } else { - Vector<Ref<Shape> > cd = mesh->convex_decompose(); + Vector<Ref<Shape>> cd = mesh->convex_decompose(); if (cd.size()) { for (int i = 0; i < cd.size(); i++) { r_shape_list.push_back(cd[i]); @@ -293,7 +293,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li } } -Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode) { +Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { @@ -382,7 +382,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; String fixed_name; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; @@ -412,7 +412,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> p_node = col; int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -468,7 +468,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; } else { @@ -486,7 +486,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> mi->set_owner(rigid_body->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -505,7 +505,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; String fixed_name; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; @@ -536,7 +536,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> col->set_owner(mi->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -618,7 +618,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<ArrayMesh> mesh = mi->get_mesh(); if (!mesh.is_null()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; } else if (_teststr(mesh->get_name(), "col")) { @@ -638,7 +638,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> col->set_owner(p_node->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -957,7 +957,7 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans } } -void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes) { +void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes) { List<PropertyInfo> pi; @@ -1209,7 +1209,7 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporte Ref<EditorSceneImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) continue; @@ -1241,7 +1241,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito Ref<EditorSceneImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) continue; @@ -1276,7 +1276,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p EditorProgress progress("import", TTR("Import Scene"), 104); progress.step(TTR("Importing Scene..."), 0); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { List<String> extensions; E->get()->get_extensions(&extensions); @@ -1368,7 +1368,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p float anim_optimizer_maxang = p_options["animation/optimizer/max_angle"]; int light_bake_mode = p_options["meshes/light_baking"]; - Map<Ref<Mesh>, List<Ref<Shape> > > collision_map; + Map<Ref<Mesh>, List<Ref<Shape>>> collision_map; scene = _fix_node(scene, scene, collision_map, LightBakeMode(light_bake_mode)); @@ -1456,9 +1456,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p } if (external_animations || external_materials || external_meshes) { - Map<Ref<Animation>, Ref<Animation> > anim_map; - Map<Ref<Material>, Ref<Material> > mat_map; - Map<Ref<ArrayMesh>, Ref<ArrayMesh> > mesh_map; + Map<Ref<Animation>, Ref<Animation>> anim_map; + Map<Ref<Material>, Ref<Material>> mat_map; + Map<Ref<ArrayMesh>, Ref<ArrayMesh>> mesh_map; bool keep_materials = bool(p_options["materials/keep_on_reimport"]); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 20e7af15b5..6d1043eb28 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -93,7 +93,7 @@ public: class ResourceImporterScene : public ResourceImporter { GDCLASS(ResourceImporterScene, ResourceImporter); - Set<Ref<EditorSceneImporter> > importers; + Set<Ref<EditorSceneImporter>> importers; static ResourceImporterScene *singleton; @@ -125,7 +125,7 @@ class ResourceImporterScene : public ResourceImporter { public: static ResourceImporterScene *get_singleton() { return singleton; } - const Set<Ref<EditorSceneImporter> > &get_importers() const { return importers; } + const Set<Ref<EditorSceneImporter>> &get_importers() const { return importers; } void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); } void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); } @@ -145,9 +145,9 @@ public: void _find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes); - void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes); + void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes); - Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode); + Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode); void _create_clips(Node *scene, const Array &p_clips, bool p_bake_all); void _filter_anim_tracks(Ref<Animation> anim, Set<String> &keep); diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 3172cc7279..2765bb7fae 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -192,7 +192,7 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr } } -Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths) { +Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen @@ -202,7 +202,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data_files.resize(p_source_file_options.size()); int idx = 0; - for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { PackData &pack_data = pack_data_files.write[idx]; const String &source = E->key(); @@ -251,7 +251,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file Ref<BitMap> bit_map; bit_map.instance(); bit_map->create_from_image_alpha(image); - Vector<Vector<Vector2> > polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height())); + Vector<Vector<Vector2>> polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height())); for (int j = 0; j < polygons.size(); j++) { @@ -323,7 +323,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //save the images idx = 0; - for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { PackData &pack_data = pack_data_files.write[idx]; diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index e455a157cf..a36cae5872 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -40,7 +40,7 @@ class ResourceImporterTextureAtlas : public ResourceImporter { Rect2 region; bool is_mesh; Vector<int> chart_pieces; //one for region, many for mesh - Vector<Vector<Vector2> > chart_vertices; //for mesh + Vector<Vector<Vector2>> chart_vertices; //for mesh Ref<Image> image; }; @@ -64,7 +64,7 @@ public: virtual String get_option_group_file() const; virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL); - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths); + virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths); ResourceImporterTextureAtlas(); }; diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 3ef88105fe..e2e68f0f41 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -112,19 +112,19 @@ void ImportDock::set_edit_path(const String &p_path) { _update_options(config); - List<Ref<ResourceImporter> > importers; + List<Ref<ResourceImporter>> importers; ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_path.get_extension(), &importers); - List<Pair<String, String> > importer_names; + List<Pair<String, String>> importer_names; - for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) { importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name())); } - importer_names.sort_custom<PairSort<String, String> >(); + importer_names.sort_custom<PairSort<String, String>>(); import_as->clear(); - for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) { + for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) { import_as->add_item(E->get().first); import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second); if (E->get().second == params->importer->get_importer_name()) { @@ -240,19 +240,19 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) { params->update(); - List<Ref<ResourceImporter> > importers; + List<Ref<ResourceImporter>> importers; ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_paths[0].get_extension(), &importers); - List<Pair<String, String> > importer_names; + List<Pair<String, String>> importer_names; - for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) { importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name())); } - importer_names.sort_custom<PairSort<String, String> >(); + importer_names.sort_custom<PairSort<String, String>>(); import_as->clear(); - for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) { + for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) { import_as->add_item(E->get().first); import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second); if (E->get().second == params->importer->get_importer_name()) { diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp index 5e53adf471..e79909fae1 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.cpp +++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp @@ -536,7 +536,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano updating = true; Set<String> paths; - HashMap<String, Set<String> > types; + HashMap<String, Set<String>> types; { List<StringName> animations; player->get_animation_list(&animations); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 5629e3854d..6e1166bb37 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2028,7 +2028,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { if (m.is_valid()) { // Save the ik chain for reapplying before IK solve - Vector<List<Dictionary> > all_bones_ik_states; + Vector<List<Dictionary>> all_bones_ik_states; for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { List<Dictionary> bones_ik_states; _save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states); @@ -2130,7 +2130,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { if (drag_selection.size() > 0) { // Save the ik chain for reapplying before IK solve - Vector<List<Dictionary> > all_bones_ik_states; + Vector<List<Dictionary>> all_bones_ik_states; for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) { List<Dictionary> bones_ik_states; _save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states); diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp index e5b948aad7..6025e7dd9d 100644 --- a/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_editor_plugin.cpp @@ -196,7 +196,7 @@ void MeshInstanceEditor::_menu_option(int p_option) { return; } - Vector<Ref<Shape> > shapes = mesh->convex_decompose(); + Vector<Ref<Shape>> shapes = mesh->convex_decompose(); if (!shapes.size()) { err_dialog->set_text(TTR("Couldn't create any collision shapes.")); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 71976d509b..4e63a498b8 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -170,7 +170,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, if (1) { - Vector<Ref<Mesh> > meshes; + Vector<Ref<Mesh>> meshes; Vector<Transform> transforms; Vector<int> ids = p_library->get_item_list(); for (int i = 0; i < ids.size(); i++) { @@ -182,7 +182,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, } } - Vector<Ref<Texture2D> > textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size")); + Vector<Ref<Texture2D>> textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size")); int j = 0; for (int i = 0; i < ids.size(); i++) { diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index bb03cad285..b3f78b5406 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -969,7 +969,7 @@ Ref<Script> ScriptEditor::_get_current_script() { Array ScriptEditor::_get_open_scripts() const { Array ret; - Vector<Ref<Script> > scripts = get_open_scripts(); + Vector<Ref<Script>> scripts = get_open_scripts(); int scrits_amount = scripts.size(); for (int idx_script = 0; idx_script < scrits_amount; idx_script++) { ret.push_back(scripts[idx_script]); @@ -1571,7 +1571,7 @@ void ScriptEditor::ensure_select_current() { _update_selected_editor_menu(); } -void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script> > &used) { +void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used) { if (p_current != p_base && p_current->get_owner() != p_base) return; @@ -1704,7 +1704,7 @@ void ScriptEditor::_update_help_overview() { return; } - Vector<Pair<String, int> > sections = se->get_sections(); + Vector<Pair<String, int>> sections = se->get_sections(); for (int i = 0; i < sections.size(); i++) { help_overview->add_item(sections[i].first); help_overview->set_item_metadata(i, sections[i].second); @@ -1757,7 +1757,7 @@ void ScriptEditor::_update_script_names() { if (restoring_layout) return; - Set<Ref<Script> > used; + Set<Ref<Script>> used; Node *edited = EditorNode::get_singleton()->get_edited_scene(); if (edited) { _find_scripts(edited, edited, used); @@ -2861,9 +2861,9 @@ void ScriptEditor::_history_back() { } } -Vector<Ref<Script> > ScriptEditor::get_open_scripts() const { +Vector<Ref<Script>> ScriptEditor::get_open_scripts() const { - Vector<Ref<Script> > out_scripts = Vector<Ref<Script> >(); + Vector<Ref<Script>> out_scripts = Vector<Ref<Script>>(); for (int i = 0; i < tab_container->get_child_count(); i++) { ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i)); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index b4b4f33fc5..81f9595264 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -351,7 +351,7 @@ class ScriptEditor : public PanelContainer { void _update_help_overview(); void _help_overview_selected(int p_idx); - void _find_scripts(Node *p_base, Node *p_current, Set<Ref<Script> > &used); + void _find_scripts(Node *p_base, Node *p_current, Set<Ref<Script>> &used); void _tree_changed(); @@ -429,7 +429,7 @@ public: void get_window_layout(Ref<ConfigFile> p_layout); void set_scene_root_script(Ref<Script> p_script); - Vector<Ref<Script> > get_open_scripts() const; + Vector<Ref<Script>> get_open_scripts() const; bool script_goto_method(Ref<Script> p_script, const String &p_method); diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 1489ea1e27..176df7efb8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -759,7 +759,7 @@ static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Scri return NULL; } -static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, Set<Ref<Script> > &r_scripts) { +static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, Set<Ref<Script>> &r_scripts) { if (p_current->get_owner() != p_base && p_base != p_current) return; @@ -780,14 +780,14 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo ERR_FAIL_COND(!get_tree()); - Set<Ref<Script> > scripts; + Set<Ref<Script>> scripts; Node *base = get_tree()->get_edited_scene_root(); if (base) { _find_changed_scripts_for_external_editor(base, base, scripts); } - for (Set<Ref<Script> >::Element *E = scripts.front(); E; E = E->next()) { + for (Set<Ref<Script>>::Element *E = scripts.front(); E; E = E->next()) { Ref<Script> script = E->get(); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 652e9c7a7d..c305c181cc 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -496,7 +496,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append, Vector2 shrinked_pos = p_pos / viewport_container->get_stretch_shrink(); Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario()); - Set<Ref<EditorSpatialGizmo> > found_gizmos; + Set<Ref<EditorSpatialGizmo>> found_gizmos; Node *edited_scene = get_tree()->get_edited_scene_root(); ObjectID closest; @@ -563,7 +563,7 @@ void SpatialEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_incl Vector3 pos = _get_ray_pos(p_pos); Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario()); - Set<Ref<EditorSpatialGizmo> > found_gizmos; + Set<Ref<EditorSpatialGizmo>> found_gizmos; r_includes_current = false; @@ -3477,7 +3477,7 @@ Vector3 SpatialEditorViewport::_get_instance_position(const Point2 &p_pos) const Vector3 world_pos = _get_ray_pos(p_pos); Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(world_pos, world_ray, get_tree()->get_root()->get_world()->get_scenario()); - Set<Ref<EditorSpatialGizmo> > found_gizmos; + Set<Ref<EditorSpatialGizmo>> found_gizmos; float closest_dist = MAX_DISTANCE; @@ -6471,7 +6471,7 @@ void EditorSpatialGizmoPlugin::create_material(const String &p_name, const Color Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6)); - Vector<Ref<StandardMaterial3D> > mats; + Vector<Ref<StandardMaterial3D>> mats; for (int i = 0; i < 4; i++) { bool selected = i % 2 == 1; @@ -6513,7 +6513,7 @@ void EditorSpatialGizmoPlugin::create_icon_material(const String &p_name, const Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6)); - Vector<Ref<StandardMaterial3D> > icons; + Vector<Ref<StandardMaterial3D>> icons; for (int i = 0; i < 4; i++) { bool selected = i % 2 == 1; @@ -6568,12 +6568,12 @@ void EditorSpatialGizmoPlugin::create_handle_material(const String &p_name, bool handle_material->set_on_top_of_alpha(); } - materials[p_name] = Vector<Ref<StandardMaterial3D> >(); + materials[p_name] = Vector<Ref<StandardMaterial3D>>(); materials[p_name].push_back(handle_material); } void EditorSpatialGizmoPlugin::add_material(const String &p_name, Ref<StandardMaterial3D> p_material) { - materials[p_name] = Vector<Ref<StandardMaterial3D> >(); + materials[p_name] = Vector<Ref<StandardMaterial3D>>(); materials[p_name].push_back(p_material); } diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 489bce1e15..9f78efacaf 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -712,8 +712,8 @@ private: static SpatialEditor *singleton; void _node_removed(Node *p_node); - Vector<Ref<EditorSpatialGizmoPlugin> > gizmo_plugins_by_priority; - Vector<Ref<EditorSpatialGizmoPlugin> > gizmo_plugins_by_name; + Vector<Ref<EditorSpatialGizmoPlugin>> gizmo_plugins_by_priority; + Vector<Ref<EditorSpatialGizmoPlugin>> gizmo_plugins_by_name; void _register_all_gizmos(); @@ -840,7 +840,7 @@ public: private: int current_state; List<EditorSpatialGizmo *> current_gizmos; - HashMap<String, Vector<Ref<StandardMaterial3D> > > materials; + HashMap<String, Vector<Ref<StandardMaterial3D>>> materials; protected: static void _bind_methods(); diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 135807e88c..2897341f06 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -204,7 +204,7 @@ void SpriteEditor::_update_mesh_data() { float epsilon = simplification->get_value(); - Vector<Vector<Vector2> > lines = bm->clip_opaque_to_polygons(rect, epsilon); + Vector<Vector<Vector2>> lines = bm->clip_opaque_to_polygons(rect, epsilon); uv_lines.clear(); diff --git a/editor/plugins/sprite_editor_plugin.h b/editor/plugins/sprite_editor_plugin.h index 13177c9142..998851b6ad 100644 --- a/editor/plugins/sprite_editor_plugin.h +++ b/editor/plugins/sprite_editor_plugin.h @@ -60,8 +60,8 @@ class SpriteEditor : public Control { ConfirmationDialog *debug_uv_dialog; Control *debug_uv; Vector<Vector2> uv_lines; - Vector<Vector<Vector2> > outline_lines; - Vector<Vector<Vector2> > computed_outline_lines; + Vector<Vector<Vector2>> outline_lines; + Vector<Vector<Vector2>> computed_outline_lines; Vector<Vector2> computed_vertices; Vector<Vector2> computed_uv; Vector<int> computed_indices; diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index 5d615c7553..e6b0e3142c 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -249,7 +249,7 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_ ERR_FAIL_COND(!frames->has_animation(edited_anim)); - List<Ref<Texture2D> > resources; + List<Ref<Texture2D>> resources; for (int i = 0; i < p_path.size(); i++) { @@ -278,7 +278,7 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_ int count = 0; - for (List<Ref<Texture2D> >::Element *E = resources.front(); E; E = E->next()) { + for (List<Ref<Texture2D>>::Element *E = resources.front(); E; E = E->next()) { undo_redo->add_do_method(frames, "add_frame", edited_anim, E->get(), p_at_pos == -1 ? -1 : p_at_pos + count); undo_redo->add_undo_method(frames, "remove_frame", edited_anim, p_at_pos == -1 ? fc : p_at_pos); diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h index d877cf9436..edc55071b7 100644 --- a/editor/plugins/texture_region_editor_plugin.h +++ b/editor/plugins/texture_region_editor_plugin.h @@ -94,7 +94,7 @@ class TextureRegionEditor : public VBoxContainer { Rect2 rect_prev; float prev_margin; int edited_margin; - Map<RID, List<Rect2> > cache_map; + Map<RID, List<Rect2>> cache_map; List<Rect2> autoslice_cache; bool autoslice_is_dirty; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index d5b52e9711..aa5caf6658 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -120,12 +120,12 @@ struct _TECategory { bool operator<(const Item<T> &p) const { return name < p.name; } }; - Set<RefItem<StyleBox> > stylebox_items; - Set<RefItem<Font> > font_items; - Set<RefItem<Texture2D> > icon_items; + Set<RefItem<StyleBox>> stylebox_items; + Set<RefItem<Font>> font_items; + Set<RefItem<Texture2D>> icon_items; - Set<Item<Color> > color_items; - Set<Item<int> > constant_items; + Set<Item<Color>> color_items; + Set<Item<int>> constant_items; }; void ThemeEditor::_save_template_cbk(String fname) { @@ -275,7 +275,7 @@ void ThemeEditor::_save_template_cbk(String fname) { if (tc.stylebox_items.size()) file->store_line("\n; StyleBox Items:\n"); - for (Set<_TECategory::RefItem<StyleBox> >::Element *F = tc.stylebox_items.front(); F; F = F->next()) { + for (Set<_TECategory::RefItem<StyleBox>>::Element *F = tc.stylebox_items.front(); F; F = F->next()) { file->store_line(E->key() + "." + F->get().name + " = default"); } @@ -283,7 +283,7 @@ void ThemeEditor::_save_template_cbk(String fname) { if (tc.font_items.size()) file->store_line("\n; Font Items:\n"); - for (Set<_TECategory::RefItem<Font> >::Element *F = tc.font_items.front(); F; F = F->next()) { + for (Set<_TECategory::RefItem<Font>>::Element *F = tc.font_items.front(); F; F = F->next()) { file->store_line(E->key() + "." + F->get().name + " = default"); } @@ -291,7 +291,7 @@ void ThemeEditor::_save_template_cbk(String fname) { if (tc.icon_items.size()) file->store_line("\n; Icon Items:\n"); - for (Set<_TECategory::RefItem<Texture2D> >::Element *F = tc.icon_items.front(); F; F = F->next()) { + for (Set<_TECategory::RefItem<Texture2D>>::Element *F = tc.icon_items.front(); F; F = F->next()) { file->store_line(E->key() + "." + F->get().name + " = default"); } @@ -299,7 +299,7 @@ void ThemeEditor::_save_template_cbk(String fname) { if (tc.color_items.size()) file->store_line("\n; Color Items:\n"); - for (Set<_TECategory::Item<Color> >::Element *F = tc.color_items.front(); F; F = F->next()) { + for (Set<_TECategory::Item<Color>>::Element *F = tc.color_items.front(); F; F = F->next()) { file->store_line(E->key() + "." + F->get().name + " = default"); } @@ -307,7 +307,7 @@ void ThemeEditor::_save_template_cbk(String fname) { if (tc.constant_items.size()) file->store_line("\n; Constant Items:\n"); - for (Set<_TECategory::Item<int> >::Element *F = tc.constant_items.front(); F; F = F->next()) { + for (Set<_TECategory::Item<int>>::Element *F = tc.constant_items.front(); F; F = F->next()) { file->store_line(E->key() + "." + F->get().name + " = default"); } diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index d23b037ed4..a5a667802e 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -2350,12 +2350,12 @@ void TileSetEditor::_undo_tile_removal(int p_id) { undo_redo->add_undo_method(tileset.ptr(), "tile_set_light_occluder", p_id, tileset->tile_get_light_occluder(p_id)); undo_redo->add_undo_method(tileset.ptr(), "tile_set_navigation_polygon", p_id, tileset->tile_get_navigation_polygon(p_id)); } else { - Map<Vector2, Ref<OccluderPolygon2D> > oclusion_map = tileset->autotile_get_light_oclusion_map(p_id); - for (Map<Vector2, Ref<OccluderPolygon2D> >::Element *E = oclusion_map.front(); E; E = E->next()) { + Map<Vector2, Ref<OccluderPolygon2D>> oclusion_map = tileset->autotile_get_light_oclusion_map(p_id); + for (Map<Vector2, Ref<OccluderPolygon2D>>::Element *E = oclusion_map.front(); E; E = E->next()) { undo_redo->add_undo_method(tileset.ptr(), "autotile_set_light_occluder", p_id, E->value(), E->key()); } - Map<Vector2, Ref<NavigationPolygon> > navigation_map = tileset->autotile_get_navigation_map(p_id); - for (Map<Vector2, Ref<NavigationPolygon> >::Element *E = navigation_map.front(); E; E = E->next()) { + Map<Vector2, Ref<NavigationPolygon>> navigation_map = tileset->autotile_get_navigation_map(p_id); + for (Map<Vector2, Ref<NavigationPolygon>>::Element *E = navigation_map.front(); E; E = E->next()) { undo_redo->add_undo_method(tileset.ptr(), "autotile_set_navigation_polygon", p_id, E->value(), E->key()); } Map<Vector2, uint32_t> bitmask_map = tileset->autotile_get_bitmask_map(p_id); @@ -2693,8 +2693,8 @@ void TileSetEditor::draw_polygon_shapes() { } } } else { - Map<Vector2, Ref<OccluderPolygon2D> > map = tileset->autotile_get_light_oclusion_map(t_id); - for (Map<Vector2, Ref<OccluderPolygon2D> >::Element *E = map.front(); E; E = E->next()) { + Map<Vector2, Ref<OccluderPolygon2D>> map = tileset->autotile_get_light_oclusion_map(t_id); + for (Map<Vector2, Ref<OccluderPolygon2D>>::Element *E = map.front(); E; E = E->next()) { Vector2 coord = E->key(); Vector2 anchor = tileset->autotile_get_size(t_id); anchor.x += tileset->autotile_get_spacing(t_id); @@ -2781,8 +2781,8 @@ void TileSetEditor::draw_polygon_shapes() { } } } else { - Map<Vector2, Ref<NavigationPolygon> > map = tileset->autotile_get_navigation_map(t_id); - for (Map<Vector2, Ref<NavigationPolygon> >::Element *E = map.front(); E; E = E->next()) { + Map<Vector2, Ref<NavigationPolygon>> map = tileset->autotile_get_navigation_map(t_id); + for (Map<Vector2, Ref<NavigationPolygon>>::Element *E = map.front(); E; E = E->next()) { Vector2 coord = E->key(); Vector2 anchor = tileset->autotile_get_size(t_id); anchor.x += tileset->autotile_get_spacing(t_id); diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index 7b49e2ece2..0d106ed454 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -114,7 +114,7 @@ class TileSetEditor : public HSplitContainer { int option; ToolButton *tileset_toolbar_buttons[TOOL_TILESET_MAX]; MenuButton *tileset_toolbar_tools; - Map<RID, Ref<Texture2D> > texture_map; + Map<RID, Ref<Texture2D>> texture_map; bool creating_shape; int dragging_point; diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 8756fe9fe9..473c1bb070 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -228,7 +228,7 @@ class VisualShaderEditor : public VBoxContainer { void _copy_nodes(); void _paste_nodes(bool p_use_custom_position = false, const Vector2 &p_custom_position = Vector2()); - Vector<Ref<VisualShaderNodePlugin> > plugins; + Vector<Ref<VisualShaderNodePlugin>> plugins; void _mode_selected(int p_id); void _rebuild(); diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index f4af50eb81..6913b0253b 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -199,7 +199,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { List<PropertyInfo> property_list; res_orig->get_property_list(&property_list); - List<Pair<String, Variant> > propvalues; + List<Pair<String, Variant>> propvalues; for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) { @@ -222,7 +222,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { ERR_FAIL_COND(res.is_null()); - for (List<Pair<String, Variant> >::Element *E = propvalues.front(); E; E = E->next()) { + for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) { Pair<String, Variant> &p = E->get(); res->set(p.first, p.second); @@ -270,7 +270,7 @@ void CustomPropertyEditor::_menu_option(int p_which) { int to_type = p_which - CONVERT_BASE_ID; - Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); ERR_FAIL_INDEX(to_type, conversions.size()); @@ -1016,7 +1016,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: if (!RES(v).is_null()) { - Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); + Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(RES(v)); if (conversions.size()) { menu->add_separator(); } @@ -1421,7 +1421,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { List<PropertyInfo> property_list; res_orig->get_property_list(&property_list); - List<Pair<String, Variant> > propvalues; + List<Pair<String, Variant>> propvalues; for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) { @@ -1440,7 +1440,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) { ERR_FAIL_COND(res.is_null()); - for (List<Pair<String, Variant> >::Element *E = propvalues.front(); E; E = E->next()) { + for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) { Pair<String, Variant> &p = E->get(); res->set(p.first, p.second); diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index 8a5fad269f..95277e72d7 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -122,7 +122,7 @@ float EditorQuickOpen::_path_cmp(String search, String path) const { return path.to_lower().similarity(search.to_lower()); } -void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture2D> > > &list) { +void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture2D>>> &list) { if (!add_directories) { for (int i = 0; i < efsd->get_subdir_count(); i++) { @@ -140,7 +140,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str if (path != "res://") { path = path.substr(6, path.length()); if (search_text.is_subsequence_ofi(path)) { - Pair<String, Ref<Texture2D> > pair; + Pair<String, Ref<Texture2D>> pair; pair.first = path; pair.second = get_icon("folder", "FileDialog"); @@ -169,7 +169,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str file = file.substr(6, file.length()); if (ClassDB::is_parent_class(efsd->get_file_type(i), base_type) && (search_text.is_subsequence_ofi(file))) { - Pair<String, Ref<Texture2D> > pair; + Pair<String, Ref<Texture2D>> pair; pair.first = file; pair.second = get_icon((has_icon(efsd->get_file_type(i), ei) ? efsd->get_file_type(i) : ot), ei); list.push_back(pair); @@ -184,10 +184,10 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<Str } } -Vector<Pair<String, Ref<Texture2D> > > EditorQuickOpen::_sort_fs(Vector<Pair<String, Ref<Texture2D> > > &list) { +Vector<Pair<String, Ref<Texture2D>>> EditorQuickOpen::_sort_fs(Vector<Pair<String, Ref<Texture2D>>> &list) { String search_text = search_box->get_text(); - Vector<Pair<String, Ref<Texture2D> > > sorted_list; + Vector<Pair<String, Ref<Texture2D>>> sorted_list; if (search_text == String() || list.size() == 0) return list; @@ -223,7 +223,7 @@ void EditorQuickOpen::_update_search() { search_options->clear(); TreeItem *root = search_options->create_item(); EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem(); - Vector<Pair<String, Ref<Texture2D> > > list; + Vector<Pair<String, Ref<Texture2D>>> list; _parse_fs(efsd, list); list = _sort_fs(list); diff --git a/editor/quick_open.h b/editor/quick_open.h index 4814e5f310..722bad3429 100644 --- a/editor/quick_open.h +++ b/editor/quick_open.h @@ -49,8 +49,8 @@ class EditorQuickOpen : public ConfirmationDialog { void _update_search(); void _sbox_input(const Ref<InputEvent> &p_ie); - void _parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture2D> > > &list); - Vector<Pair<String, Ref<Texture2D> > > _sort_fs(Vector<Pair<String, Ref<Texture2D> > > &list); + void _parse_fs(EditorFileSystemDirectory *efsd, Vector<Pair<String, Ref<Texture2D>>> &list); + Vector<Pair<String, Ref<Texture2D>>> _sort_fs(Vector<Pair<String, Ref<Texture2D>>> &list); float _path_cmp(String search, String path) const; void _confirmed(); diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h index 2825cb2cd2..537aa1703b 100644 --- a/editor/rename_dialog.h +++ b/editor/rename_dialog.h @@ -96,7 +96,7 @@ class RenameDialog : public ConfirmationDialog { Label *lbl_preview_title; Label *lbl_preview; - List<Pair<NodePath, String> > to_rename; + List<Pair<NodePath, String>> to_rename; Node *preview_node; bool lock_preview_update; ErrorHandlerList eh; diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index c5ebf40482..7845af7f79 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1229,7 +1229,7 @@ void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) { } } -void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath> > *p_renames) { +void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath>> *p_renames) { base_path.push_back(p_node->get_name()); if (new_base_path.size()) @@ -1252,7 +1252,7 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path, Vector<Stri } } -void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath> > *p_renames) { +void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath>> *p_renames) { if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks", true))) return; @@ -1279,9 +1279,9 @@ void SceneTreeDock::fill_path_renames(Node *p_node, Node *p_new_parent, List<Pai _fill_path_renames(base_path, new_base_path, p_node, p_renames); } -void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodePath> > *p_renames, Map<Ref<Animation>, Set<int> > *r_rem_anims) { +void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodePath>> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims) { - Map<Ref<Animation>, Set<int> > rem_anims; + Map<Ref<Animation>, Set<int>> rem_anims; if (!r_rem_anims) r_rem_anims = &rem_anims; @@ -1311,7 +1311,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP if (p.get_type() == Variant::NODE_PATH) { // Goes through all paths to check if its matching - for (List<Pair<NodePath, NodePath> >::Element *F = p_renames->front(); F; F = F->next()) { + for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) { NodePath root_path = p_base->get_path(); @@ -1353,7 +1353,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP NodePath root_path = root->get_path(); NodePath new_root_path = root_path; - for (List<Pair<NodePath, NodePath> >::Element *E = p_renames->front(); E; E = E->next()) { + for (List<Pair<NodePath, NodePath>>::Element *E = p_renames->front(); E; E = E->next()) { if (E->get().first == root_path) { new_root_path = E->get().second; @@ -1392,7 +1392,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP if (!ran.has(i)) continue; //channel was removed - for (List<Pair<NodePath, NodePath> >::Element *F = p_renames->front(); F; F = F->next()) { + for (List<Pair<NodePath, NodePath>>::Element *F = p_renames->front(); F; F = F->next()) { if (F->get().first == old_np) { @@ -1443,7 +1443,7 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP void SceneTreeDock::_node_prerenamed(Node *p_node, const String &p_new_name) { - List<Pair<NodePath, NodePath> > path_renames; + List<Pair<NodePath, NodePath>> path_renames; Vector<StringName> base_path; Node *n = p_node->get_parent(); @@ -1554,7 +1554,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V editor_data->get_undo_redo().create_action(TTR("Reparent Node")); - List<Pair<NodePath, NodePath> > path_renames; + List<Pair<NodePath, NodePath>> path_renames; Vector<StringName> former_names; int inc = 0; @@ -1814,7 +1814,7 @@ void SceneTreeDock::_delete_confirm() { } else { remove_list.sort_custom<Node::Comparator>(); //sort nodes to keep positions - List<Pair<NodePath, NodePath> > path_renames; + List<Pair<NodePath, NodePath>> path_renames; //delete from animation for (List<Node *>::Element *E = remove_list.front(); E; E = E->next()) { diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h index c6ddbc3dfe..e41ea1ce97 100644 --- a/editor/scene_tree_dock.h +++ b/editor/scene_tree_dock.h @@ -205,7 +205,7 @@ class SceneTreeDock : public VBoxContainer { void _update_script_button(); Node *_get_selection_group_tail(Node *p_node, List<Node *> p_list); - void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath> > *p_renames); + void _fill_path_renames(Vector<StringName> base_path, Vector<StringName> new_base_path, Node *p_node, List<Pair<NodePath, NodePath>> *p_renames); void _normalize_drop(Node *&to_node, int &to_pos, int p_type); @@ -249,8 +249,8 @@ public: void instance(const String &p_file); void instance_scenes(const Vector<String> &p_files, Node *p_parent = NULL); void set_selected(Node *p_node, bool p_emit_selected = false); - void fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath> > *p_renames); - void perform_node_renames(Node *p_base, List<Pair<NodePath, NodePath> > *p_renames, Map<Ref<Animation>, Set<int> > *r_rem_anims = NULL); + void fill_path_renames(Node *p_node, Node *p_new_parent, List<Pair<NodePath, NodePath>> *p_renames); + void perform_node_renames(Node *p_base, List<Pair<NodePath, NodePath>> *p_renames, Map<Ref<Animation>, Set<int>> *r_rem_anims = NULL); SceneTreeEditor *get_tree_editor() { return scene_tree; } EditorData *get_editor_data() { return editor_data; } diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index e4e642e368..782df12d4b 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -905,7 +905,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from return Variant(); //not editable tree Vector<Node *> selected; - Vector<Ref<Texture2D> > icons; + Vector<Ref<Texture2D>> icons; TreeItem *next = tree->get_next_selected(NULL); while (next) { diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index eb133abcd5..5a111afe32 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -419,7 +419,7 @@ void ScriptCreateDialog::_lang_changed(int l) { templates[i].id = new_id; } // Disable overridden - for (Map<String, Vector<int> >::Element *E = template_overrides.front(); E; E = E->next()) { + for (Map<String, Vector<int>>::Element *E = template_overrides.front(); E; E = E->next()) { const Vector<int> &overrides = E->get(); if (overrides.size() == 1) { diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h index 00f642fcf7..f73309c373 100644 --- a/editor/script_create_dialog.h +++ b/editor/script_create_dialog.h @@ -93,7 +93,7 @@ class ScriptCreateDialog : public ConfirmationDialog { String script_template; Vector<ScriptTemplateInfo> template_list; - Map<String, Vector<int> > template_overrides; // name : indices + Map<String, Vector<int>> template_overrides; // name : indices void _update_script_templates(const String &p_extension); |