Remove or make private FileAccess close() methods.

This commit is contained in:
bruvzg
2022-04-12 11:15:02 +03:00
parent 788f355ad2
commit d2ebac3a30
21 changed files with 44 additions and 74 deletions

View File

@ -71,10 +71,7 @@ void FileAccessUnix::check_errors() const {
}
Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) {
if (f) {
fclose(f);
}
f = nullptr;
_close();
path_src = p_path;
path = fix_path(p_path);
@ -148,7 +145,7 @@ Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) {
return OK;
}
void FileAccessUnix::close() {
void FileAccessUnix::_close() {
if (!f) {
return;
}
@ -343,7 +340,7 @@ Ref<FileAccess> FileAccessUnix::create_libc() {
CloseNotificationFunc FileAccessUnix::close_notification_func = nullptr;
FileAccessUnix::~FileAccessUnix() {
close();
_close();
}
#endif