aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorJohannes Schickel2016-01-07 11:14:00 +0100
committerJohannes Schickel2016-01-07 11:25:02 +0100
commit54f5c95832921b72583144e53fa45318a60e9ff9 (patch)
treecfe4f30a481bba1b6cdf6c15ede4da98eea44359 /backends/fs
parent1baf3bed7ab240f2ca0f5696b1e78dc741222ae2 (diff)
downloadscummvm-rg350-54f5c95832921b72583144e53fa45318a60e9ff9.tar.gz
scummvm-rg350-54f5c95832921b72583144e53fa45318a60e9ff9.tar.bz2
scummvm-rg350-54f5c95832921b72583144e53fa45318a60e9ff9.zip
COMMON: Make FSNode(AbstractFSNode *) private again.
This also fixes a memory leak in OSystem_iOS7::addSysArchivesToSearchSet.
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/abstract-fs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 34a8120caa..dcfdc08975 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -84,6 +84,20 @@ protected:
public:
/**
+ * Construct a FSNode object from an AbstractFSNode object.
+ *
+ * This is a helper to create Common::FSNode objects when the backend's
+ * FileSystemFactory cannot create the given AbstractFSNode object itself.
+ * All other code is supposed to use Common::FSNode's constructor itself.
+ *
+ * @param realNode Pointer to a heap allocated instance. FSNode will take
+ * ownership of the pointer.
+ */
+ static Common::FSNode makeFSNode(AbstractFSNode *realNode) {
+ return Common::FSNode(realNode);
+ }
+
+ /**
* Destructor.
*/
virtual ~AbstractFSNode() {}