summaryrefslogtreecommitdiffstats
path: root/editor/localization_editor.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-07-15 23:45:57 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-07-23 17:38:28 -0400
commit4e6efd1b07f1c6d53d226977ddc729333b74306a (patch)
treea52f672e7f622bb65e3b65f2a2edc9d19b1ecdcf /editor/localization_editor.cpp
parentb918c4c3ce84af1f8af2d06ef31784f48a15551a (diff)
downloadredot-engine-4e6efd1b07f1c6d53d226977ddc729333b74306a.tar.gz
Use C++ iterators for Lists in many situations
Diffstat (limited to 'editor/localization_editor.cpp')
-rw-r--r--editor/localization_editor.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index f51decd9dc..d4b712b6a3 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -43,15 +43,15 @@ void LocalizationEditor::_notification(int p_what) {
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
- for (List<String>::Element *E = tfn.front(); E; E = E->next()) {
- translation_file_open->add_filter("*." + E->get());
+ for (String &E : tfn) {
+ translation_file_open->add_filter("*." + E);
}
List<String> rfn;
ResourceLoader::get_recognized_extensions_for_type("Resource", &rfn);
- for (List<String>::Element *E = rfn.front(); E; E = E->next()) {
- translation_res_file_open_dialog->add_filter("*." + E->get());
- translation_res_option_file_open_dialog->add_filter("*." + E->get());
+ for (String &E : rfn) {
+ translation_res_file_open_dialog->add_filter("*." + E);
+ translation_res_option_file_open_dialog->add_filter("*." + E);
}
_update_pot_file_extensions();
@@ -430,8 +430,8 @@ void LocalizationEditor::_update_pot_file_extensions() {
pot_file_open_dialog->clear_filters();
List<String> translation_parse_file_extensions;
EditorTranslationParser::get_singleton()->get_recognized_extensions(&translation_parse_file_extensions);
- for (List<String>::Element *E = translation_parse_file_extensions.front(); E; E = E->next()) {
- pot_file_open_dialog->add_filter("*." + E->get());
+ for (String &E : translation_parse_file_extensions) {
+ pot_file_open_dialog->add_filter("*." + E);
}
}
@@ -560,8 +560,8 @@ void LocalizationEditor::update_translations() {
List<Variant> rk;
remaps.get_key_list(&rk);
Vector<String> keys;
- for (List<Variant>::Element *E = rk.front(); E; E = E->next()) {
- keys.push_back(E->get());
+ for (Variant &E : rk) {
+ keys.push_back(E);
}
keys.sort();