diff options
Diffstat (limited to 'editor/pot_generator.cpp')
-rw-r--r-- | editor/pot_generator.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index f6839bae6b..0835d0212f 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -46,8 +46,8 @@ void POTGenerator::_print_all_translation_strings() { print_line("msgid: " + E.key()); print_line("context: " + v_md[i].ctx); print_line("msgid_plural: " + v_md[i].plural); - for (Set<String>::Element *E = v_md[i].locations.front(); E; E = E->next()) { - print_line("location: " + E->get()); + for (Set<String>::Element *F = v_md[i].locations.front(); F; F = F->next()) { + print_line("location: " + F->get()); } } } @@ -93,7 +93,7 @@ void POTGenerator::generate_pot(const String &p_file) { void POTGenerator::_write_to_pot(const String &p_file) { Error err; - FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err); + Ref<FileAccess> file = FileAccess::open(p_file, FileAccess::WRITE, &err); if (err != OK) { ERR_PRINT("Failed to open " + p_file); return; @@ -155,11 +155,9 @@ void POTGenerator::_write_to_pot(const String &p_file) { } } } - - file->close(); } -void POTGenerator::_write_msgid(FileAccess *r_file, const String &p_id, bool p_plural) { +void POTGenerator::_write_msgid(Ref<FileAccess> r_file, const String &p_id, bool p_plural) { // Split \\n and \n. Vector<String> temp = p_id.split("\\n"); Vector<String> msg_lines; |