Remove or make private FileAccess close() methods.
This commit is contained in:
parent
788f355ad2
commit
d2ebac3a30
21 changed files with 44 additions and 74 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -50,12 +50,12 @@ class FileAccessUnix : public FileAccess {
|
|||
String path_src;
|
||||
|
||||
static Ref<FileAccess> create_libc();
|
||||
void _close();
|
||||
|
||||
public:
|
||||
static CloseNotificationFunc close_notification_func;
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue