summaryrefslogtreecommitdiff
path: root/core/os/file_access.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/file_access.h')
-rw-r--r--core/os/file_access.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/os/file_access.h b/core/os/file_access.h
index 0ee29abbc9..48b9ee4269 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -41,7 +41,6 @@
*/
class FileAccess {
-
public:
enum AccessType {
ACCESS_RESOURCES,
@@ -73,7 +72,6 @@ private:
static CreateFunc create_func[ACCESS_MAX]; /** default file access creation function for a platform */
template <class T>
static FileAccess *_create_builtin() {
-
return memnew(T);
}
@@ -172,7 +170,6 @@ public:
template <class T>
static void make_default(AccessType p_access) {
-
create_func[p_access] = _create_builtin<T>;
}
@@ -181,9 +178,7 @@ public:
};
struct FileAccessRef {
-
_FORCE_INLINE_ FileAccess *operator->() {
-
return f;
}
@@ -195,8 +190,9 @@ struct FileAccessRef {
FileAccessRef(FileAccess *fa) { f = fa; }
~FileAccessRef() {
- if (f)
+ if (f) {
memdelete(f);
+ }
}
};