diff options
author | Johannes Schickel | 2016-02-09 12:10:04 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-09 12:10:04 +0100 |
commit | 01d3d026790f47609af2f9a6bacdfeb385e86abc (patch) | |
tree | c119d19a53d21ce3c25b7740872a54c154c5b719 | |
parent | 40124825616a670a4daf76f274ac4b47e4059085 (diff) | |
download | scummvm-rg350-01d3d026790f47609af2f9a6bacdfeb385e86abc.tar.gz scummvm-rg350-01d3d026790f47609af2f9a6bacdfeb385e86abc.tar.bz2 scummvm-rg350-01d3d026790f47609af2f9a6bacdfeb385e86abc.zip |
COMMON: Fix formatting issues in archive.cpp.
-rw-r--r-- | common/archive.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/common/archive.cpp b/common/archive.cpp index 36d420561f..5a339900b6 100644 --- a/common/archive.cpp +++ b/common/archive.cpp @@ -48,7 +48,7 @@ int Archive::listMatchingMembers(ArchiveMemberList &list, const String &pattern) int matches = 0; ArchiveMemberList::const_iterator it = allNames.begin(); - for ( ; it != allNames.end(); ++it) { + for (; it != allNames.end(); ++it) { // TODO: We match case-insenstivie for now, our API does not define whether that's ok or not though... // For our use case case-insensitive is probably what we want to have though. if ((*it)->getName().matchString(pattern, true, true)) { @@ -64,7 +64,7 @@ int Archive::listMatchingMembers(ArchiveMemberList &list, const String &pattern) SearchSet::ArchiveNodeList::iterator SearchSet::find(const String &name) { ArchiveNodeList::iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { if (it->_name == name) break; } @@ -73,7 +73,7 @@ SearchSet::ArchiveNodeList::iterator SearchSet::find(const String &name) { SearchSet::ArchiveNodeList::const_iterator SearchSet::find(const String &name) const { ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { if (it->_name == name) break; } @@ -81,13 +81,13 @@ SearchSet::ArchiveNodeList::const_iterator SearchSet::find(const String &name) c } /* - Keep the nodes sorted according to descending priorities. - In case two or node nodes have the same priority, insertion - order prevails. + Keep the nodes sorted according to descending priorities. + In case two or node nodes have the same priority, insertion + order prevails. */ void SearchSet::insert(const Node &node) { ArchiveNodeList::iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { if (it->_priority < node._priority) break; } @@ -131,8 +131,7 @@ void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPa ++sep; if (sep != origPattern.end()) nextPattern = String(sep, origPattern.end()); - } - else { + } else { pattern = origPattern; } @@ -211,7 +210,7 @@ bool SearchSet::hasFile(const String &name) const { return false; ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { if (it->_arc->hasFile(name)) return true; } @@ -223,7 +222,7 @@ int SearchSet::listMatchingMembers(ArchiveMemberList &list, const String &patter int matches = 0; ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) + for (; it != _list.end(); ++it) matches += it->_arc->listMatchingMembers(list, pattern); return matches; @@ -233,7 +232,7 @@ int SearchSet::listMembers(ArchiveMemberList &list) const { int matches = 0; ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) + for (; it != _list.end(); ++it) matches += it->_arc->listMembers(list); return matches; @@ -244,7 +243,7 @@ const ArchiveMemberPtr SearchSet::getMember(const String &name) const { return ArchiveMemberPtr(); ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { if (it->_arc->hasFile(name)) return it->_arc->getMember(name); } @@ -257,7 +256,7 @@ SeekableReadStream *SearchSet::createReadStreamForMember(const String &name) con return 0; ArchiveNodeList::const_iterator it = _list.begin(); - for ( ; it != _list.end(); ++it) { + for (; it != _list.end(); ++it) { SeekableReadStream *stream = it->_arc->createReadStreamForMember(name); if (stream) return stream; @@ -268,7 +267,7 @@ SeekableReadStream *SearchSet::createReadStreamForMember(const String &name) con SearchManager::SearchManager() { - clear(); // Force a reset + clear(); // Force a reset } void SearchManager::clear() { |