diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-12 11:15:02 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-04-12 14:50:14 +0300 |
commit | d2ebac3a302f41223ab86f5bc2862dd3a050a010 (patch) | |
tree | a360d9c508dacd4d00ce9ca9525a1b8c83a5bdd7 /drivers/windows | |
parent | 788f355ad2f8c1826f5e55477249934d45d62891 (diff) |
Remove or make private `FileAccess` `close()` methods.
Diffstat (limited to 'drivers/windows')
-rw-r--r-- | drivers/windows/file_access_windows.cpp | 9 | ||||
-rw-r--r-- | drivers/windows/file_access_windows.h | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 59dc1d8e77..1a66d19373 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -59,11 +59,10 @@ void FileAccessWindows::check_errors() const { } Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { + _close(); + path_src = p_path; path = fix_path(p_path); - if (f) { - close(); - } const WCHAR *mode_string; @@ -134,7 +133,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { } } -void FileAccessWindows::close() { +void FileAccessWindows::_close() { if (!f) { return; } @@ -350,7 +349,7 @@ Error FileAccessWindows::_set_unix_permissions(const String &p_file, uint32_t p_ } FileAccessWindows::~FileAccessWindows() { - close(); + _close(); } #endif // WINDOWS_ENABLED diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h index 93d37c3b5a..5d67b6ca4f 100644 --- a/drivers/windows/file_access_windows.h +++ b/drivers/windows/file_access_windows.h @@ -48,9 +48,10 @@ class FileAccessWindows : public FileAccess { String path_src; String save_path; + void _close(); + public: virtual Error _open(const String &p_path, int p_mode_flags); ///< open a file - virtual void close(); ///< close a file virtual bool is_open() const; ///< true when file is open virtual String get_path() const; /// returns the path for the current open file |