diff options
Diffstat (limited to 'editor/pot_generator.cpp')
-rw-r--r-- | editor/pot_generator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index 5afd460831..0835d0212f 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -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; |