diff options
author | reduz <reduzio@gmail.com> | 2022-05-19 17:00:06 +0200 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-05-20 22:40:38 +0200 |
commit | 45af29da8095af16729955117a165d23e77cd740 (patch) | |
tree | 0436c59187702466a73d05caf9688a58e5935afd /editor/editor_file_system.h | |
parent | 410893ad0fb6f0d7d774b6529581d886defd6cf0 (diff) | |
download | redot-engine-45af29da8095af16729955117a165d23e77cd740.tar.gz |
Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
Diffstat (limited to 'editor/editor_file_system.h')
-rw-r--r-- | editor/editor_file_system.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 743684a9ca..07b1132046 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -34,7 +34,7 @@ #include "core/io/dir_access.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" -#include "core/templates/rb_set.h" +#include "core/templates/hash_set.h" #include "core/templates/safe_refcount.h" #include "core/templates/thread_work_pool.h" #include "scene/main/node.h" @@ -180,7 +180,7 @@ class EditorFileSystem : public Node { void _scan_filesystem(); - RBSet<String> late_update_files; + HashSet<String> late_update_files; void _save_late_updated_files(); @@ -221,9 +221,9 @@ class EditorFileSystem : public Node { void _delete_internal_files(String p_file); - RBSet<String> textfile_extensions; - RBSet<String> valid_extensions; - RBSet<String> import_extensions; + HashSet<String> textfile_extensions; + HashSet<String> valid_extensions; + HashSet<String> import_extensions; void _scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAccess> &da, const ScanProgress &p_progress); @@ -269,11 +269,11 @@ 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, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport); + void _find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, HashSet<String> &groups_to_reimport); void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location); - RBSet<String> group_file_cache; + HashSet<String> group_file_cache; ThreadWorkPool import_threads; @@ -306,7 +306,7 @@ public: void scan(); void scan_changes(); void update_file(const String &p_file); - RBSet<String> get_valid_extensions() const; + HashSet<String> get_valid_extensions() const; EditorFileSystemDirectory *get_filesystem_path(const String &p_path); String get_file_type(const String &p_file) const; |