summaryrefslogtreecommitdiffstats
path: root/editor/find_in_files.h
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-05-13 15:04:37 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-05-16 10:37:48 +0200
commit746dddc0673d7261f19b1e056e90e6e3a49ef33a (patch)
tree434b526eb286850ebccc6d2c998a7d90fdb8b5e2 /editor/find_in_files.h
parent396def9b66c476f7834604adb7136ca903ed01be (diff)
downloadredot-engine-746dddc0673d7261f19b1e056e90e6e3a49ef33a.tar.gz
Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
Diffstat (limited to 'editor/find_in_files.h')
-rw-r--r--editor/find_in_files.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index 9def190b5b..8bc7b506d0 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -46,7 +46,7 @@ public:
void set_whole_words(bool p_whole_word);
void set_match_case(bool p_match_case);
void set_folder(String folder);
- void set_filter(const Set<String> &exts);
+ void set_filter(const RBSet<String> &exts);
String get_search_text() const { return _pattern; }
@@ -72,7 +72,7 @@ private:
// Config
String _pattern;
- Set<String> _extension_filter;
+ RBSet<String> _extension_filter;
String _root_dir;
bool _whole_words = true;
bool _match_case = true;
@@ -115,7 +115,7 @@ public:
bool is_match_case() const;
bool is_whole_words() const;
String get_folder() const;
- Set<String> get_filter() const;
+ RBSet<String> get_filter() const;
protected:
void _notification(int p_what);
@@ -208,8 +208,8 @@ private:
Button *_refresh_button = nullptr;
Button *_cancel_button = nullptr;
ProgressBar *_progress_bar = nullptr;
- Map<String, TreeItem *> _file_items;
- Map<TreeItem *, Result> _result_items;
+ HashMap<String, TreeItem *> _file_items;
+ HashMap<TreeItem *, Result> _result_items;
bool _with_replace = false;
HBoxContainer *_replace_container = nullptr;