You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Use C++ iterators for Lists in many situations
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user