summaryrefslogtreecommitdiff
path: root/editor/find_in_files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/find_in_files.cpp')
-rw-r--r--editor/find_in_files.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index 41191271a1..d60e336f0f 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -99,7 +99,7 @@ void FindInFiles::set_folder(String folder) {
_root_dir = folder;
}
-void FindInFiles::set_filter(const Set<String> &exts) {
+void FindInFiles::set_filter(const HashSet<String> &exts) {
_extension_filter = exts;
}
@@ -443,9 +443,9 @@ String FindInFilesDialog::get_folder() const {
return text.strip_edges();
}
-Set<String> FindInFilesDialog::get_filter() const {
+HashSet<String> FindInFilesDialog::get_filter() const {
// Could check the _filters_preferences but it might not have been generated yet.
- Set<String> filters;
+ HashSet<String> filters;
for (int i = 0; i < _filters_container->get_child_count(); ++i) {
CheckBox *cb = static_cast<CheckBox *>(_filters_container->get_child(i));
if (cb->is_pressed()) {
@@ -701,9 +701,9 @@ void FindInFilesPanel::_notification(int p_what) {
void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin, int end, String text) {
TreeItem *file_item;
- Map<String, TreeItem *>::Element *E = _file_items.find(fpath);
+ HashMap<String, TreeItem *>::Iterator E = _file_items.find(fpath);
- if (E == nullptr) {
+ if (!E) {
file_item = _results_display->create_item();
file_item->set_text(0, fpath);
file_item->set_metadata(0, fpath);
@@ -715,7 +715,7 @@ void FindInFilesPanel::_on_result_found(String fpath, int line_number, int begin
_file_items[fpath] = file_item;
} else {
- file_item = E->value();
+ file_item = E->value;
}
int text_index = _with_replace ? 1 : 0;
@@ -754,11 +754,11 @@ void FindInFilesPanel::draw_result_text(Object *item_obj, Rect2 rect) {
return;
}
- Map<TreeItem *, Result>::Element *E = _result_items.find(item);
+ HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item);
if (!E) {
return;
}
- Result r = E->value();
+ Result r = E->value;
String item_text = item->get_text(_with_replace ? 1 : 0);
Ref<Font> font = _results_display->get_theme_font(SNAME("font"));
int font_size = _results_display->get_theme_font_size(SNAME("font_size"));
@@ -818,12 +818,12 @@ void FindInFilesPanel::_on_cancel_button_clicked() {
void FindInFilesPanel::_on_result_selected() {
TreeItem *item = _results_display->get_selected();
- Map<TreeItem *, Result>::Element *E = _result_items.find(item);
+ HashMap<TreeItem *, Result>::Iterator E = _result_items.find(item);
- if (E == nullptr) {
+ if (!E) {
return;
}
- Result r = E->value();
+ Result r = E->value;
TreeItem *file_item = item->get_parent();
String fpath = file_item->get_metadata(0);
@@ -850,9 +850,9 @@ void FindInFilesPanel::_on_replace_all_clicked() {
continue;
}
- Map<TreeItem *, Result>::Element *F = _result_items.find(item);
- ERR_FAIL_COND(F == nullptr);
- locations.push_back(F->value());
+ HashMap<TreeItem *, Result>::Iterator F = _result_items.find(item);
+ ERR_FAIL_COND(!F);
+ locations.push_back(F->value);
}
if (locations.size() != 0) {