summaryrefslogtreecommitdiff
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r--scene/gui/file_dialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 9ed3a2244e..2e4204e171 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -552,9 +552,9 @@ void FileDialog::update_file_list() {
bool match = patterns.is_empty();
String match_str;
- for (List<String>::Element *E = patterns.front(); E; E = E->next()) {
- if (files.front()->get().matchn(E->get())) {
- match_str = E->get();
+ for (const String &E : patterns) {
+ if (files.front()->get().matchn(E)) {
+ match_str = E;
match = true;
break;
}