summaryrefslogtreecommitdiff
path: root/editor/pot_generator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pot_generator.cpp')
-rw-r--r--editor/pot_generator.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index 0835d0212f..a00df0ef40 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -39,15 +39,15 @@ POTGenerator *POTGenerator::singleton = nullptr;
#ifdef DEBUG_POT
void POTGenerator::_print_all_translation_strings() {
- for (OrderedHashMap<String, Vector<POTGenerator::MsgidData>>::Element E = all_translation_strings.front(); E; E = E.next()) {
+ for (HashMap<String, Vector<POTGenerator::MsgidData>>::Element E = all_translation_strings.front(); E; E = E.next()) {
Vector<MsgidData> v_md = all_translation_strings[E.key()];
for (int i = 0; i < v_md.size(); i++) {
print_line("++++++");
print_line("msgid: " + E.key());
print_line("context: " + v_md[i].ctx);
print_line("msgid_plural: " + v_md[i].plural);
- for (Set<String>::Element *F = v_md[i].locations.front(); F; F = F->next()) {
- print_line("location: " + F->get());
+ for (const String &F : v_md[i].locations) {
+ print_line("location: " + F);
}
}
}
@@ -121,20 +121,20 @@ void POTGenerator::_write_to_pot(const String &p_file) {
file->store_string(header);
- for (OrderedHashMap<String, Vector<MsgidData>>::Element E_pair = all_translation_strings.front(); E_pair; E_pair = E_pair.next()) {
- String msgid = E_pair.key();
- Vector<MsgidData> v_msgid_data = E_pair.value();
+ for (const KeyValue<String, Vector<MsgidData>> &E_pair : all_translation_strings) {
+ String msgid = E_pair.key;
+ const Vector<MsgidData> &v_msgid_data = E_pair.value;
for (int i = 0; i < v_msgid_data.size(); i++) {
String context = v_msgid_data[i].ctx;
String plural = v_msgid_data[i].plural;
- const Set<String> &locations = v_msgid_data[i].locations;
+ const HashSet<String> &locations = v_msgid_data[i].locations;
// Put the blank line at the start, to avoid a double at the end when closing the file.
file->store_line("");
// Write file locations.
- for (Set<String>::Element *E = locations.front(); E; E = E->next()) {
- file->store_line("#: " + E->get().trim_prefix("res://"));
+ for (const String &E : locations) {
+ file->store_line("#: " + E.trim_prefix("res://"));
}
// Write context.