diff options
author | Max Horn | 2008-09-03 11:22:51 +0000 |
---|---|---|
committer | Max Horn | 2008-09-03 11:22:51 +0000 |
commit | 531bcf847ceef2b9eca82e0b3ef8473612889632 (patch) | |
tree | 62165f50a0cf03be924036a3249522e22dd62102 /backends/fs/wii | |
parent | c350ffabf3d589722b1bee95f63a783fbf39cc1b (diff) | |
download | scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.tar.gz scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.tar.bz2 scummvm-rg350-531bcf847ceef2b9eca82e0b3ef8473612889632.zip |
Moved FilesystemNode / FSList to namespace Common; also got rid of some 'typedef Common::String String;' name aliases
svn-id: r34302
Diffstat (limited to 'backends/fs/wii')
-rw-r--r-- | backends/fs/wii/wii-fs-factory.cpp | 2 | ||||
-rw-r--r-- | backends/fs/wii/wii-fs-factory.h | 4 | ||||
-rw-r--r-- | backends/fs/wii/wii-fs.cpp | 30 |
3 files changed, 17 insertions, 19 deletions
diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp index 9839858dd5..69086a95f1 100644 --- a/backends/fs/wii/wii-fs-factory.cpp +++ b/backends/fs/wii/wii-fs-factory.cpp @@ -42,7 +42,7 @@ AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() con return new WiiFilesystemNode(); } -AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const String &path) const { +AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const Common::String &path) const { return new WiiFilesystemNode(path, true); } #endif diff --git a/backends/fs/wii/wii-fs-factory.h b/backends/fs/wii/wii-fs-factory.h index 24badee330..36867a392c 100644 --- a/backends/fs/wii/wii-fs-factory.h +++ b/backends/fs/wii/wii-fs-factory.h @@ -33,11 +33,9 @@ */ class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton<WiiFilesystemFactory> { public: - typedef Common::String String; - virtual AbstractFilesystemNode *makeRootFileNode() const; virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + virtual AbstractFilesystemNode *makeFileNodePath(const Common::String &path) const; protected: WiiFilesystemFactory() {}; diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp index 4272ffb380..0d489d3a99 100644 --- a/backends/fs/wii/wii-fs.cpp +++ b/backends/fs/wii/wii-fs.cpp @@ -37,8 +37,8 @@ */ class WiiFilesystemNode : public AbstractFilesystemNode { protected: - String _displayName; - String _path; + Common::String _displayName; + Common::String _path; bool _isDirectory, _isReadable, _isWritable; public: @@ -50,20 +50,20 @@ public: /** * Creates a WiiFilesystemNode for a given path. * - * @param path String with the path the new node should point to. + * @param path Common::String with the path the new node should point to. * @param verify true if the isValid and isDirectory flags should be verified during the construction. */ - WiiFilesystemNode(const String &path, bool verify); + WiiFilesystemNode(const Common::String &path, bool verify); virtual bool exists() const; - virtual String getDisplayName() const { return _displayName; } - virtual String getName() const { return _displayName; } - virtual String getPath() const { return _path; } + virtual Common::String getDisplayName() const { return _displayName; } + virtual Common::String getName() const { return _displayName; } + virtual Common::String getPath() const { return _path; } virtual bool isDirectory() const { return _isDirectory; } virtual bool isReadable() const { return _isReadable; } virtual bool isWritable() const { return _isWritable; } - virtual AbstractFilesystemNode *getChild(const String &n) const; + virtual AbstractFilesystemNode *getChild(const Common::String &n) const; virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const; virtual AbstractFilesystemNode *getParent() const; @@ -94,7 +94,7 @@ WiiFilesystemNode::WiiFilesystemNode() { setFlags(); } -WiiFilesystemNode::WiiFilesystemNode(const String &p, bool verify) { +WiiFilesystemNode::WiiFilesystemNode(const Common::String &p, bool verify) { assert(p.size() > 0); _path = p; @@ -110,10 +110,10 @@ bool WiiFilesystemNode::exists() const { return stat(_path.c_str (), &st) == 0; } -AbstractFilesystemNode *WiiFilesystemNode::getChild(const String &n) const { +AbstractFilesystemNode *WiiFilesystemNode::getChild(const Common::String &n) const { assert(_isDirectory); - String newPath(_path); + Common::String newPath(_path); if (newPath.lastChar() != '/') newPath += '/'; newPath += n; @@ -136,15 +136,15 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0) continue; - String newPath(_path); + Common::String newPath(_path); if (newPath.lastChar() != '/') newPath += '/'; newPath += filename; bool isDir = S_ISDIR(st.st_mode); - if ((mode == FilesystemNode::kListFilesOnly && isDir) || - (mode == FilesystemNode::kListDirectoriesOnly && !isDir)) + if ((mode == Common::FilesystemNode::kListFilesOnly && isDir) || + (mode == Common::FilesystemNode::kListDirectoriesOnly && !isDir)) continue; if (isDir) @@ -165,7 +165,7 @@ AbstractFilesystemNode *WiiFilesystemNode::getParent() const { const char *start = _path.c_str(); const char *end = lastPathComponent(_path, '/'); - return new WiiFilesystemNode(String(start, end - start), true); + return new WiiFilesystemNode(Common::String(start, end - start), true); } #endif //#if defined(__WII__) |