diff options
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r-- | editor/editor_file_system.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 099dfe69d5..36ac9afca8 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -514,7 +514,7 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { if (import_support_queries.size() == 0) { return false; } - Map<String, int> import_support_test; + HashMap<String, int> import_support_test; Vector<bool> import_support_tested; import_support_tested.resize(import_support_queries.size()); for (int i = 0; i < import_support_queries.size(); i++) { @@ -532,9 +532,9 @@ bool EditorFileSystem::_scan_import_support(Vector<String> reimports) { } for (int i = 0; i < reimports.size(); i++) { - Map<String, int>::Element *E = import_support_test.find(reimports[i].get_extension()); + HashMap<String, int>::Iterator E = import_support_test.find(reimports[i].get_extension()); if (E) { - import_support_tested.write[E->get()] = true; + import_support_tested.write[E->value] = true; } } @@ -1458,7 +1458,7 @@ void EditorFileSystem::_save_late_updated_files() { String fscache = EditorSettings::get_singleton()->get_project_settings_dir().plus_file("filesystem_update4"); Ref<FileAccess> f = FileAccess::open(fscache, FileAccess::WRITE); ERR_FAIL_COND_MSG(f.is_null(), "Cannot create file '" + fscache + "'. Check user write permissions."); - for (Set<String>::Element *E = late_update_files.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = late_update_files.front(); E; E = E->next()) { f->store_line(E->get()); } } @@ -1636,15 +1636,15 @@ void EditorFileSystem::update_file(const String &p_file) { _queue_update_script_classes(); } -Set<String> EditorFileSystem::get_valid_extensions() const { +RBSet<String> EditorFileSystem::get_valid_extensions() const { return valid_extensions; } Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector<String> &p_files) { String importer_name; - Map<String, Map<StringName, Variant>> source_file_options; - Map<String, String> base_paths; + HashMap<String, HashMap<StringName, Variant>> source_file_options; + HashMap<String, String> base_paths; for (int i = 0; i < p_files.size(); i++) { Ref<ConfigFile> config; config.instantiate(); @@ -1659,7 +1659,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector ERR_FAIL_V(ERR_FILE_CORRUPT); } - source_file_options[p_files[i]] = Map<StringName, Variant>(); + source_file_options[p_files[i]] = HashMap<StringName, Variant>(); importer_name = file_importer_name; if (importer_name == "keep") { @@ -1699,7 +1699,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 (const KeyValue<String, Map<StringName, Variant>> &E : source_file_options) { + for (const KeyValue<String, HashMap<StringName, Variant>> &E : source_file_options) { const String &file = E.key; String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file); Vector<String> dest_paths; @@ -1808,7 +1808,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector return err; } -void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName, Variant> *p_custom_options, const String &p_custom_importer) { +void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options, const String &p_custom_importer) { EditorFileSystemDirectory *fs = nullptr; int cpos = -1; bool found = _find_file(p_file, &fs, cpos); @@ -1816,7 +1816,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName //try to obtain existing params - Map<StringName, Variant> params; + HashMap<StringName, Variant> params; String importer_name; //empty by default though if (!p_custom_importer.is_empty()) { @@ -2047,7 +2047,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map<StringName 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, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport) { int fc = efd->files.size(); const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr(); for (int i = 0; i < fc; i++) { @@ -2064,7 +2064,7 @@ void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<Str } } -void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const Map<StringName, Variant> &p_custom_params) { +void EditorFileSystem::reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params) { _reimport_file(p_file, &p_custom_params, p_importer); } @@ -2079,7 +2079,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { Vector<ImportFile> reimport_files; - Set<String> groups_to_reimport; + RBSet<String> groups_to_reimport; for (int i = 0; i < p_files.size(); i++) { String file = p_files[i]; @@ -2165,7 +2165,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { //reimport groups if (groups_to_reimport.size()) { - Map<String, Vector<String>> group_files; + HashMap<String, Vector<String>> group_files; _find_group_files(filesystem, group_files, groups_to_reimport); for (const KeyValue<String, Vector<String>> &E : group_files) { Error err = _reimport_group(E.key, E.value); @@ -2290,7 +2290,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const } } -static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &extensions) { +static void _scan_extensions_dir(EditorFileSystemDirectory *d, RBSet<String> &extensions) { int fc = d->get_file_count(); for (int i = 0; i < fc; i++) { if (d->get_file_type(i) == SNAME("NativeExtension")) { @@ -2304,7 +2304,7 @@ static void _scan_extensions_dir(EditorFileSystemDirectory *d, Set<String> &exte } bool EditorFileSystem::_scan_extensions() { EditorFileSystemDirectory *d = get_filesystem(); - Set<String> extensions; + RBSet<String> extensions; _scan_extensions_dir(d, extensions); |