diff options
author | Max Horn | 2010-01-13 23:58:25 +0000 |
---|---|---|
committer | Max Horn | 2010-01-13 23:58:25 +0000 |
commit | 8559f0c3eb6af52c4bd97637f8bec17fe025c909 (patch) | |
tree | 7fef959ac9bd50701b56f538079860c5dbe88958 /engines/sci | |
parent | a88b2639f5d4cfae5f8f8a115f2c703653dbd296 (diff) | |
download | scummvm-rg350-8559f0c3eb6af52c4bd97637f8bec17fe025c909.tar.gz scummvm-rg350-8559f0c3eb6af52c4bd97637f8bec17fe025c909.tar.bz2 scummvm-rg350-8559f0c3eb6af52c4bd97637f8bec17fe025c909.zip |
SCI: Use prefix increment instead of postfix on iterators (more efficient); also correct code formatting issues
svn-id: r47295
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/console.cpp | 2 | ||||
-rw-r--r-- | engines/sci/resource.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index 30dd6b179c..325bf04ef1 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -766,7 +766,7 @@ bool Console::cmdList(int argc, const char **argv) { if (++cnt % 4 == 0) DebugPrintf("\n"); } - itr++; + ++itr; } DebugPrintf("\n"); diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9428b1abed..9861b6892c 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -309,7 +309,7 @@ Common::File *ResourceManager::getVolumeFile(const char *filename) { } return file; } - it ++; + ++it; } // adding a new file file = new Common::File; @@ -468,7 +468,7 @@ int ResourceManager::addInternalSources() { else if (Common::File::exists("RESOURCE.AUD")) addSource(src, kSourceAudioVolume, "RESOURCE.AUD", 0); - itr++; + ++itr; } return 1; @@ -576,14 +576,14 @@ ResourceManager::~ResourceManager() { ResourceMap::iterator itr = _resMap.begin(); while (itr != _resMap.end()) { delete itr->_value; - itr ++; + ++itr; } freeResourceSources(); Common::List<Common::File *>::iterator it = _volumeFiles.begin(); while (it != _volumeFiles.end()) { delete *it; - it ++; + ++it; } } @@ -622,8 +622,8 @@ void ResourceManager::printLRU() { res = *it; debug("\t%s: %d bytes", res->id.toString().c_str(), res->size); mem += res->size; - entries ++; - it ++; + ++entries; + ++it; } debug("Total: %d entries, %d bytes (mgr says %d)", entries, mem, _memoryLRU); @@ -648,7 +648,7 @@ Common::List<ResourceId> *ResourceManager::listResources(ResourceType type, int while (itr != _resMap.end()) { if ((itr->_value->id.type == type) && ((mapNumber == -1) || (itr->_value->id.number == mapNumber))) resources->push_back(itr->_value->id); - itr++; + ++itr; } return resources; @@ -984,7 +984,7 @@ void ResourceManager::readResourcePatches(ResourceSource *source) { const char *szResType; ResourceSource *psrcPatch; - for (int i = kResourceTypeView; i < kResourceTypeInvalid; i ++) { + for (int i = kResourceTypeView; i < kResourceTypeInvalid; ++i) { files.clear(); szResType = getResourceTypeName((ResourceType)i); // SCI0 naming - type.nnn @@ -995,7 +995,7 @@ void ResourceManager::readResourcePatches(ResourceSource *source) { mask = "*."; mask += resourceTypeSuffixes[i]; SearchMan.listMatchingMembers(files, mask); - for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); x++) { + for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) { bool bAdd = false; name = (*x)->getName(); // SCI1 scheme @@ -1027,7 +1027,7 @@ void ResourceManager::readWaveAudioPatches() { Common::ArchiveMemberList files; SearchMan.listMatchingMembers(files, "*.wav"); - for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); x++) { + for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) { Common::String name = (*x)->getName(); if (isdigit(name[0])) { |