diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-04-26 22:32:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-26 22:32:50 +0200 |
commit | 639b02f4541be289a10f2e7bc80fd1ea67e4cf32 (patch) | |
tree | 999ab45ae185e456b7b455502a3de2edac9cbed3 /core | |
parent | f6e5ea774ba071e995a2c7a3f225285d9e708c5a (diff) | |
parent | 5d124c4a8f86176e8adafab3d3703f28e597cb12 (diff) |
Merge pull request #48185 from Calinou/codestyle-no-auto
Remove uses of `auto` for better readability and online code reviews
Diffstat (limited to 'core')
-rw-r--r-- | core/string/translation.cpp | 2 | ||||
-rw-r--r-- | core/string/translation_po.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/core/string/translation.cpp b/core/string/translation.cpp index ade5f7b4d8..153f0190fd 100644 --- a/core/string/translation.cpp +++ b/core/string/translation.cpp @@ -835,7 +835,7 @@ Vector<String> Translation::_get_message_list() const { void Translation::_set_messages(const Dictionary &p_messages) { List<Variant> keys; p_messages.get_key_list(&keys); - for (auto E = keys.front(); E; E = E->next()) { + for (List<Variant>::Element *E = keys.front(); E; E = E->next()) { translation_map[E->get()] = p_messages[E->get()]; } } diff --git a/core/string/translation_po.cpp b/core/string/translation_po.cpp index 2efadaa9b7..ad768f7140 100644 --- a/core/string/translation_po.cpp +++ b/core/string/translation_po.cpp @@ -47,14 +47,14 @@ void TranslationPO::print_translation_map() { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (auto E = context_l.front(); E; E = E->next()) { + for (List<StringName>::Element *E = context_l.front(); E; E = E->next()) { StringName ctx = E->get(); file->store_line(" ===== Context: " + String::utf8(String(ctx).utf8()) + " ===== "); const HashMap<StringName, Vector<StringName>> &inner_map = translation_map[ctx]; List<StringName> id_l; inner_map.get_key_list(&id_l); - for (auto E2 = id_l.front(); E2; E2 = E2->next()) { + for (List<StringName>::Element *E2 = id_l.front(); E2; E2 = E2->next()) { StringName id = E2->get(); file->store_line("msgid: " + String::utf8(String(id).utf8())); for (int i = 0; i < inner_map[id].size(); i++) { @@ -74,7 +74,7 @@ Dictionary TranslationPO::_get_messages() const { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (auto E = context_l.front(); E; E = E->next()) { + for (List<StringName>::Element *E = context_l.front(); E; E = E->next()) { StringName ctx = E->get(); const HashMap<StringName, Vector<StringName>> &id_str_map = translation_map[ctx]; @@ -82,7 +82,7 @@ Dictionary TranslationPO::_get_messages() const { List<StringName> id_l; id_str_map.get_key_list(&id_l); // Save list of id and strs associated with a context in a temporary dictionary. - for (auto E2 = id_l.front(); E2; E2 = E2->next()) { + for (List<StringName>::Element *E2 = id_l.front(); E2; E2 = E2->next()) { StringName id = E2->get(); d2[id] = id_str_map[id]; } @@ -98,14 +98,14 @@ void TranslationPO::_set_messages(const Dictionary &p_messages) { List<Variant> context_l; p_messages.get_key_list(&context_l); - for (auto E = context_l.front(); E; E = E->next()) { + for (List<Variant>::Element *E = context_l.front(); E; E = E->next()) { StringName ctx = E->get(); const Dictionary &id_str_map = p_messages[ctx]; HashMap<StringName, Vector<StringName>> temp_map; List<Variant> id_l; id_str_map.get_key_list(&id_l); - for (auto E2 = id_l.front(); E2; E2 = E2->next()) { + for (List<Variant>::Element *E2 = id_l.front(); E2; E2 = E2->next()) { StringName id = E2->get(); temp_map[id] = id_str_map[id]; } @@ -121,7 +121,7 @@ Vector<String> TranslationPO::_get_message_list() const { get_message_list(&msgs); Vector<String> v; - for (auto E = msgs.front(); E; E = E->next()) { + for (List<StringName>::Element *E = msgs.front(); E; E = E->next()) { v.push_back(E->get()); } @@ -281,7 +281,7 @@ void TranslationPO::get_message_list(List<StringName> *r_messages) const { List<StringName> context_l; translation_map.get_key_list(&context_l); - for (auto E = context_l.front(); E; E = E->next()) { + for (List<StringName>::Element *E = context_l.front(); E; E = E->next()) { if (String(E->get()) != "") { continue; } @@ -289,7 +289,7 @@ void TranslationPO::get_message_list(List<StringName> *r_messages) const { List<StringName> msgid_l; translation_map[E->get()].get_key_list(&msgid_l); - for (auto E2 = msgid_l.front(); E2; E2 = E2->next()) { + for (List<StringName>::Element *E2 = msgid_l.front(); E2; E2 = E2->next()) { r_messages->push_back(E2->get()); } } @@ -300,7 +300,7 @@ int TranslationPO::get_message_count() const { translation_map.get_key_list(&context_l); int count = 0; - for (auto E = context_l.front(); E; E = E->next()) { + for (List<StringName>::Element *E = context_l.front(); E; E = E->next()) { count += translation_map[E->get()].size(); } return count; |