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/amigaos4/amigaos4-fs.cpp | |
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/amigaos4/amigaos4-fs.cpp')
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
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(); |