diff options
author | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
commit | 66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985 (patch) | |
tree | e27aadabecd8dd910884280e6559ff9c94c3d73c /backends/fs/psp | |
parent | 278857698dc7b1623096fe1ad12511dc4c886c7e (diff) | |
download | scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.gz scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.bz2 scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.zip |
Removed trailing spaces.
svn-id: r30664
Diffstat (limited to 'backends/fs/psp')
-rw-r--r-- | backends/fs/psp/psp-fs-factory.h | 10 | ||||
-rw-r--r-- | backends/fs/psp/psp-fs.cpp | 42 |
2 files changed, 26 insertions, 26 deletions
diff --git a/backends/fs/psp/psp-fs-factory.h b/backends/fs/psp/psp-fs-factory.h index 83a59dcc6a..143b2ce684 100644 --- a/backends/fs/psp/psp-fs-factory.h +++ b/backends/fs/psp/psp-fs-factory.h @@ -30,20 +30,20 @@ /** * Creates PSPFilesystemNode objects. - * + * * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. */ -class PSPFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PSPFilesystemFactory> { +class PSPFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PSPFilesystemFactory> { public: typedef Common::String String; - + virtual AbstractFilesystemNode *makeRootFileNode() const; virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - + protected: PSPFilesystemFactory() {}; - + private: friend class Common::Singleton<SingletonBaseType>; }; diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp index 2f7ec803fe..7e850e3a52 100644 --- a/backends/fs/psp/psp-fs.cpp +++ b/backends/fs/psp/psp-fs.cpp @@ -34,7 +34,7 @@ /** * Implementation of the ScummVM file system API based on PSPSDK API. - * + * * Parts of this class are documented in the base interface class, AbstractFilesystemNode. */ class PSPFilesystemNode : public AbstractFilesystemNode { @@ -43,16 +43,16 @@ protected: String _path; bool _isDirectory; bool _isValid; - + public: /** * Creates a PSPFilesystemNode with the root node as path. */ PSPFilesystemNode(); - + /** * Creates a PSPFilesystemNode for a given path. - * + * * @param path 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. */ @@ -73,18 +73,18 @@ public: /** * Returns the last component of a given path. - * + * * Examples: * /foo/bar.txt would return /bar.txt * /foo/bar/ would return /bar/ - * + * * @param str String containing the path. * @return Pointer to the first char of the last component inside str. */ const char *lastPathComponent(const Common::String &str) { if(str.empty()) return ""; - + const char *start = str.c_str(); const char *cur = start + str.size() - 2; @@ -104,24 +104,24 @@ PSPFilesystemNode::PSPFilesystemNode() { PSPFilesystemNode::PSPFilesystemNode(const Common::String &p, bool verify) { assert(p.size() > 0); - + _path = p; _displayName = lastPathComponent(_path); _isValid = true; _isDirectory = true; if (verify) { - struct stat st; + struct stat st; _isValid = (0 == stat(_path.c_str(), &st)); _isDirectory = S_ISDIR(st.st_mode); - } + } } AbstractFilesystemNode *PSPFilesystemNode::getChild(const String &n) const { // FIXME: Pretty lame implementation! We do no error checking to speak // of, do not check if this is a special node, etc. assert(_isDirectory); - + String newPath(_path); if (_path.lastChar() != '/') newPath += '/'; @@ -137,30 +137,30 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool int dfd = sceIoDopen(_path.c_str()); if (dfd > 0) { - SceIoDirent dir; + SceIoDirent dir; memset(&dir, 0, sizeof(dir)); - + while (sceIoDread(dfd, &dir) > 0) { // Skip 'invisible files - if (dir.d_name[0] == '.') + if (dir.d_name[0] == '.') continue; - + PSPFilesystemNode entry; - + entry._isValid = true; entry._displayName = dir.d_name; entry._path = _path; entry._path += dir.d_name; entry._isDirectory = dir.d_stat.st_attr & FIO_SO_IFDIR; - + if (entry._isDirectory) entry._path += "/"; - + // Honor the chosen mode if ((mode == FilesystemNode::kListFilesOnly && entry._isDirectory) || (mode == FilesystemNode::kListDirectoriesOnly && !entry._isDirectory)) continue; - + myList.push_back(new PSPFilesystemNode(entry)); } @@ -174,10 +174,10 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool AbstractFilesystemNode *PSPFilesystemNode::getParent() const { if (_path == ROOT_PATH) return 0; - + const char *start = _path.c_str(); const char *end = lastPathComponent(_path); - + return new PSPFilesystemNode(String(start, end - start), false); } |