diff options
author | Max Horn | 2004-11-21 13:18:07 +0000 |
---|---|---|
committer | Max Horn | 2004-11-21 13:18:07 +0000 |
commit | 01cb15b9b272301d5d135c66caa9ee02d1f62b08 (patch) | |
tree | ba1e4a66d668f1062f528018f76891b81966ec81 /backends/fs/fs.cpp | |
parent | eb44281ecb6ae01155c3e93c31b29b14cfcd6e73 (diff) | |
download | scummvm-rg350-01cb15b9b272301d5d135c66caa9ee02d1f62b08.tar.gz scummvm-rg350-01cb15b9b272301d5d135c66caa9ee02d1f62b08.tar.bz2 scummvm-rg350-01cb15b9b272301d5d135c66caa9ee02d1f62b08.zip |
Since we do ref counting on the nodes now, we can re-use the root nodes now
svn-id: r15851
Diffstat (limited to 'backends/fs/fs.cpp')
-rw-r--r-- | backends/fs/fs.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backends/fs/fs.cpp b/backends/fs/fs.cpp index 1c9b7efe5d..e051e46c9a 100644 --- a/backends/fs/fs.cpp +++ b/backends/fs/fs.cpp @@ -72,7 +72,10 @@ FilesystemNode &FilesystemNode::operator =(const FilesystemNode &node) { } FilesystemNode FilesystemNode::getParent() const { - FilesystemNode wrapper; - wrapper._realNode = _realNode->parent(); - return wrapper; + AbstractFilesystemNode *node = _realNode->parent(); + if (node == 0) + return *this; + else { + return AbstractFilesystemNode::wrap(node); + } } |