diff options
author | Max Horn | 2009-09-30 16:16:53 +0000 |
---|---|---|
committer | Max Horn | 2009-09-30 16:16:53 +0000 |
commit | 8ba75fc522f16844524dd4d6f88c3851e2402969 (patch) | |
tree | df25c20389e3e706d508f37914dedc73c6479f00 /backends/fs | |
parent | 25dde91c7c6c7da52636e3daa34bd9eee5d9dcb9 (diff) | |
download | scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.gz scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.tar.bz2 scummvm-rg350-8ba75fc522f16844524dd4d6f88c3851e2402969.zip |
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
Diffstat (limited to 'backends/fs')
-rw-r--r-- | backends/fs/abstract-fs.cpp | 2 | ||||
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.cpp | 31 | ||||
-rw-r--r-- | backends/fs/psp/psp-fs.cpp | 2 | ||||
-rw-r--r-- | backends/fs/symbian/symbian-fs.cpp | 6 | ||||
-rw-r--r-- | backends/fs/symbian/symbianstream.cpp | 4 |
5 files changed, 20 insertions, 25 deletions
diff --git a/backends/fs/abstract-fs.cpp b/backends/fs/abstract-fs.cpp index aa341e70d9..f110e862b7 100644 --- a/backends/fs/abstract-fs.cpp +++ b/backends/fs/abstract-fs.cpp @@ -26,7 +26,7 @@ const char *AbstractFSNode::lastPathComponent(const Common::String &str, const char sep) { // TODO: Get rid of this eventually! Use Common::lastPathComponent instead - if(str.empty()) + if (str.empty()) return ""; const char *start = str.c_str(); diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp index 183558409e..9eababe60b 100644 --- a/backends/fs/amigaos4/amigaos4-fs.cpp +++ b/backends/fs/amigaos4/amigaos4-fs.cpp @@ -179,8 +179,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) { const char c = _sPath.lastChar(); if (c != '/' && c != ':') _sPath += '/'; - } - else { + } else { //_bIsDirectory = false; _bIsValid = true; } @@ -231,15 +230,13 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam const char c = _sPath.lastChar(); if (c != '/' && c != ':') _sPath += '/'; - } - else { + } else { //_bIsDirectory = false; _bIsValid = true; } IDOS->FreeDosObject(DOS_EXAMINEDATA, pExd); - } - else { + } else { debug(6, "ExamineObject() returned NULL"); } @@ -268,7 +265,7 @@ AmigaOSFilesystemNode::~AmigaOSFilesystemNode() { bool AmigaOSFilesystemNode::exists() const { ENTER(); - if(_sPath.empty()) + if (_sPath.empty()) return false; bool nodeExists = false; @@ -352,16 +349,16 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b struct ExamineData * pExd = NULL; // NB: no need to free value after usage, all is dealt by the DirContext release AmigaOSFilesystemNode *entry ; - while( (pExd = IDOS->ExamineDir(context)) ) { - if( (EXD_IS_FILE(pExd) && ( Common::FSNode::kListFilesOnly == mode )) + while ( (pExd = IDOS->ExamineDir(context)) ) { + if ( (EXD_IS_FILE(pExd) && ( Common::FSNode::kListFilesOnly == mode )) || (EXD_IS_DIRECTORY(pExd) && ( Common::FSNode::kListDirectoriesOnly == mode )) || Common::FSNode::kListAll == mode ) { BPTR pLock = IDOS->Lock( pExd->Name, SHARED_LOCK ); - if( pLock ) { + if (pLock) { entry = new AmigaOSFilesystemNode( pLock, pExd->Name ); - if( entry ) { + if (entry) { myList.push_back(entry); } @@ -369,18 +366,17 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b } } } - if( ERROR_NO_MORE_ENTRIES != IDOS->IoErr() ) { + + if (ERROR_NO_MORE_ENTRIES != IDOS->IoErr() ) { debug(6, "An error occured during ExamineDir"); ret = false; - } - else { + } else { ret = true; } IDOS->ReleaseDirContext(context); - } - else { + } else { debug(6, "Unable to ObtainDirContext"); ret = false; } @@ -411,8 +407,7 @@ AbstractFSNode *AmigaOSFilesystemNode::getParent() const { if (parentDir) { node = new AmigaOSFilesystemNode(parentDir); IDOS->UnLock(parentDir); - } - else + } else node = new AmigaOSFilesystemNode(); LEAVE(); diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp index 0c53020d94..75a91e5802 100644 --- a/backends/fs/psp/psp-fs.cpp +++ b/backends/fs/psp/psp-fs.cpp @@ -96,7 +96,7 @@ PSPFilesystemNode::PSPFilesystemNode(const Common::String &p, bool verify) { if (verify) { struct stat st; - if(PowerMan.beginCriticalSection()==PowerManager::Blocked) + if (PowerMan.beginCriticalSection()==PowerManager::Blocked) PSPDebugSuspend("Suspended in PSPFilesystemNode::PSPFilesystemNode\n"); _isValid = (0 == stat(_path.c_str(), &st)); PowerMan.endCriticalSection(); diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp index 2fa5d7b142..5d4951e269 100644 --- a/backends/fs/symbian/symbian-fs.cpp +++ b/backends/fs/symbian/symbian-fs.cpp @@ -66,9 +66,9 @@ public: TPtrC8 ptr((const unsigned char*) _path.c_str(), _path.size()); fname.Copy(ptr); TBool fileExists = BaflUtils::FileExists(static_cast<OSystem_SDL_Symbian*> (g_system)->FsSession(), fname); - if(!fileExists) { + if (!fileExists) { TParsePtrC parser(fname); - if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) { + if (parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) { fileExists = ETrue; } } @@ -137,7 +137,7 @@ SymbianFilesystemNode::SymbianFilesystemNode(const Common::String &path) { _isValid = ETrue; _isDirectory = EFalse; TParsePtrC parser(fname); - if(parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) { + if (parser.PathPresent() && parser.Path().Compare(_L("\\")) == KErrNone && !parser.NameOrExtPresent()) { _isDirectory = ETrue; } } diff --git a/backends/fs/symbian/symbianstream.cpp b/backends/fs/symbian/symbianstream.cpp index 650bbd0dcd..c926cc65f8 100644 --- a/backends/fs/symbian/symbianstream.cpp +++ b/backends/fs/symbian/symbianstream.cpp @@ -71,7 +71,7 @@ TSymbianFileEntry* CreateSymbianFileEntry(const char* name, const char* mode) { fileMode = fileMode| EFileShareAny; - switch(mode[0]) { + switch (mode[0]) { case 'a': if (fileEntry->_fileHandle.Open(static_cast<OSystem_SDL_Symbian*>(g_system)->FsSession(), tempFileName, fileMode) != KErrNone) { if (fileEntry->_fileHandle.Create(static_cast<OSystem_SDL_Symbian*>(g_system)->FsSession(), tempFileName, fileMode) != KErrNone) { @@ -160,7 +160,7 @@ size_t ReadData(const void* ptr, size_t size, size_t numItems, TSymbianFileEntry } } - if((numItems * size) != pointer.Length() && entry->_lastError == KErrNone) { + if ((numItems * size) != pointer.Length() && entry->_lastError == KErrNone) { entry->_eofReached = ETrue; } |