aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2008-09-04 20:03:08 +0000
committerMax Horn2008-09-04 20:03:08 +0000
commit5409b2b456974418a5b99eaf914bc11188ad7cdb (patch)
treed822bad804b5938ae210585a92a900be243eb3a5 /common
parentcf7ab829e37c8cd782c6fcee3cd9ebfca48cc56c (diff)
downloadscummvm-rg350-5409b2b456974418a5b99eaf914bc11188ad7cdb.tar.gz
scummvm-rg350-5409b2b456974418a5b99eaf914bc11188ad7cdb.tar.bz2
scummvm-rg350-5409b2b456974418a5b99eaf914bc11188ad7cdb.zip
Changed FSDirectory::getSubDirectory to return a FSDirectory pointer instead of a SharedPtr
svn-id: r34334
Diffstat (limited to 'common')
-rw-r--r--common/archive.cpp7
-rw-r--r--common/archive.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/common/archive.cpp b/common/archive.cpp
index 575fa3857d..bdea62b895 100644
--- a/common/archive.cpp
+++ b/common/archive.cpp
@@ -93,14 +93,13 @@ SeekableReadStream *FSDirectory::openFile(const String &name) {
return stream;
}
-SharedPtr<FSDirectory> FSDirectory::getSubDirectory(const String &name) {
+FSDirectory *FSDirectory::getSubDirectory(const String &name) {
if (name.empty() || !_node.isDirectory()) {
- // return a null SharedPtr
- return SharedPtr<FSDirectory>();
+ return 0;
}
FilesystemNode node = lookupCache(_subDirCache, name);
- return SharedPtr<FSDirectory>(new FSDirectory(node));
+ return new FSDirectory(node);
}
void FSDirectory::cacheDirectoryRecursive(FilesystemNode node, int depth, const String& prefix) {
diff --git a/common/archive.h b/common/archive.h
index e6a4728312..97eaf801a7 100644
--- a/common/archive.h
+++ b/common/archive.h
@@ -136,7 +136,7 @@ public:
* Create a new FSDirectory pointing to a sub directory of the instance.
* @return A new FSDirectory instance conveniently wrapped in a SharedPtr.
*/
- SharedPtr<FSDirectory> getSubDirectory(const String &name);
+ FSDirectory *getSubDirectory(const String &name);
virtual bool hasFile(const String &name);
virtual int matchPattern(StringList &list, const String &pattern);