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/symbian | |
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/symbian')
-rw-r--r-- | backends/fs/symbian/symbian-fs-factory.h | 10 | ||||
-rw-r--r-- | backends/fs/symbian/symbian-fs.cpp | 50 |
2 files changed, 30 insertions, 30 deletions
diff --git a/backends/fs/symbian/symbian-fs-factory.h b/backends/fs/symbian/symbian-fs-factory.h index b30ca89f99..4b663fd6b9 100644 --- a/backends/fs/symbian/symbian-fs-factory.h +++ b/backends/fs/symbian/symbian-fs-factory.h @@ -30,20 +30,20 @@ /** * Creates SymbianFilesystemNode objects. - * + * * Parts of this class are documented in the base interface class, AbstractFilesystemFactory. */ -class SymbianFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<SymbianFilesystemFactory> { +class SymbianFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<SymbianFilesystemFactory> { public: typedef Common::String String; - + virtual AbstractFilesystemNode *makeRootFileNode() const; virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - + protected: SymbianFilesystemFactory() {}; - + private: friend class Common::Singleton<SingletonBaseType>; }; diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp index 90d7bb48d4..d4c4513d90 100644 --- a/backends/fs/symbian/symbian-fs.cpp +++ b/backends/fs/symbian/symbian-fs.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#if defined (__SYMBIAN32__) +#if defined (__SYMBIAN32__) #include "backends/fs/abstract-fs.h" #include <dirent.h> @@ -32,7 +32,7 @@ /** * Implementation of the ScummVM file system API based on POSIX. - * + * * Parts of this class are documented in the base interface class, AbstractFilesystemNode. */ class SymbianFilesystemNode : public AbstractFilesystemNode { @@ -46,19 +46,19 @@ protected: public: /** * Creates a SymbianFilesystemNode with the root node as path. - * + * * @param aIsRoot true if the node will be a pseudo root, false otherwise. */ SymbianFilesystemNode(bool aIsRoot); - + /** * Creates a SymbianFilesystemNode for a given path. - * + * * @param path String with the path the new node should point to. */ SymbianFilesystemNode(const String &path); - - virtual bool exists() const { + + virtual bool exists() const { TFileName fname; TPtrC8 ptr((const unsigned char*)_path.c_str(),_path.size()); fname.Copy(ptr); @@ -79,18 +79,18 @@ public: /** * Returns the last component of a given path. - * + * * Examples: * c:\foo\bar.txt would return "\bar.txt" * c:\foo\bar\ would return "\bar\" - * + * * @param str Path to obtain the last component from. * @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; @@ -103,14 +103,14 @@ const char *lastPathComponent(const Common::String &str) { /** * Fixes the path by changing all slashes to backslashes. - * + * * @param path String with the path to be fixed. */ static void fixFilePath(Common::String& path) { TInt len = path.size(); - + for (TInt index = 0; index < len; index++) { - if (path[index] == '/') { + if (path[index] == '/') { path[index] = '\\'; } } @@ -132,7 +132,7 @@ SymbianFilesystemNode::SymbianFilesystemNode(const String &path) { _isPseudoRoot = false; _path = path; - + fixFilePath(_path); _displayName = lastPathComponent(_path); @@ -184,27 +184,27 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b TVolumeInfo volumeInfo; TBuf8<30> driveLabel8; TBuf8<30> driveString8; - + for (driveNumber=EDriveA; driveNumber<=EDriveZ; driveNumber++) { TInt err = fs.Volume(volumeInfo, driveNumber); if (err != KErrNone) - continue; + continue; if (fs.DriveToChar(driveNumber,driveLetter) != KErrNone) continue; driveLetterValue = driveLetter; - if (volumeInfo.iName.Length() > 0) { + if (volumeInfo.iName.Length() > 0) { driveLabel8.Copy(volumeInfo.iName); // 16 to 8bit des // enabling this line alone gives KERN-EXEC 3 with non-optimized GCC? WHY? grrr driveString8.Format(_L8("Drive %c: (%S)"), driveLetterValue, &driveLabel8); } else { driveString8.Format(_L8("Drive %c:"), driveLetterValue); } - + char path[10]; sprintf(path,"%c:\\", driveNumber+'A'); - - SymbianFilesystemNode entry(false); + + SymbianFilesystemNode entry(false); entry._displayName = (char*)driveString8.PtrZ(); // drive_name entry._isDirectory = true; entry._isValid = true; @@ -226,17 +226,17 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b nameBuf.Copy(fileentry.iName); SymbianFilesystemNode entry(false); entry._isPseudoRoot = false; - + entry._displayName =(char*)nameBuf.PtrZ(); entry._path = _path; entry._path +=(char*)nameBuf.PtrZ(); entry._isDirectory = fileentry.IsDir(); - + // Honor the chosen mode if ((mode == FilesystemNode::kListFilesOnly && entry._isDirectory) || (mode == FilesystemNode::kListDirectoriesOnly && !entry._isDirectory)) continue; - + if (entry._isDirectory) entry._path += "\\"; myList.push_back(new SymbianFilesystemNode(entry)); @@ -244,7 +244,7 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b CleanupStack::PopAndDestroy(dirPtr); } } - + return true; } @@ -267,7 +267,7 @@ AbstractFilesystemNode *SymbianFilesystemNode::getParent() const { { p = new SymbianFilesystemNode(true); } - + return p; } |