diff --git a/pcsx2/CDVD/CompressedFileReader.cpp b/pcsx2/CDVD/CompressedFileReader.cpp index 8b15deae1e..ca9659f805 100644 --- a/pcsx2/CDVD/CompressedFileReader.cpp +++ b/pcsx2/CDVD/CompressedFileReader.cpp @@ -166,7 +166,7 @@ void ChunksCache::Take(void* pMallocedSrc, PX_off_t offset, int length, int cove // By design, succeed only if the entire request is in a single cached chunk int ChunksCache::Read(void* pDest, PX_off_t offset, int length) { - for (std::list::iterator it = m_entries.begin(); it != m_entries.end(); it++) { + for (auto it = m_entries.begin(); it != m_entries.end(); it++) { CacheEntry* e = *it; if (e && offset >= e->offset && (offset + length) <= (e->offset + e->coverage)) { if (it != m_entries.begin()) diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 6e996918f4..aba6cc8003 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -96,8 +96,7 @@ void BaseGameDatabaseImpl::updateGame(const Game_Data& game) // Searches the current game's data to see if the given key exists bool Game_Data::keyExists(const wxChar* key) const { - KeyPairArray::const_iterator it( kList.begin() ); - for ( ; it != kList.end(); ++it) { + for (auto it = kList.begin(); it != kList.end(); ++it) { if (it->CompareKey(key)) { return true; } @@ -107,8 +106,7 @@ bool Game_Data::keyExists(const wxChar* key) const { // Totally Deletes the specified key/pair value from the current game's data void Game_Data::deleteKey(const wxChar* key) { - KeyPairArray::iterator it( kList.begin() ); - for ( ; it != kList.end(); ++it) { + for (auto it = kList.begin(); it != kList.end(); ++it) { if (it->CompareKey(key)) { kList.erase(it); return; @@ -118,8 +116,7 @@ void Game_Data::deleteKey(const wxChar* key) { // Gets a string representation of the 'value' for the given key wxString Game_Data::getString(const wxChar* key) const { - KeyPairArray::const_iterator it( kList.begin() ); - for ( ; it != kList.end(); ++it) { + for (auto it = kList.begin(); it != kList.end(); ++it) { if (it->CompareKey(key)) { return it->value; } @@ -128,8 +125,7 @@ wxString Game_Data::getString(const wxChar* key) const { } void Game_Data::writeString(const wxString& key, const wxString& value) { - KeyPairArray::iterator it( kList.begin() ); - for ( ; it != kList.end(); ++it) { + for (auto it = kList.begin(); it != kList.end(); ++it) { if (it->CompareKey(key)) { if( value.IsEmpty() ) kList.erase(it); diff --git a/pcsx2/gui/AppGameDatabase.cpp b/pcsx2/gui/AppGameDatabase.cpp index 635d526adc..891730e6d2 100644 --- a/pcsx2/gui/AppGameDatabase.cpp +++ b/pcsx2/gui/AppGameDatabase.cpp @@ -212,8 +212,8 @@ void AppGameDatabase::SaveToFile(const wxString& file) { for( uint gameidx=0; gameidx<=endidx; ++gameidx ) { const Game_Data& game( m_BlockTable[blockidx][gameidx] ); - KeyPairArray::const_iterator i(game.kList.begin()); - for ( ; i != game.kList.end(); ++i) { + + for (auto i = game.kList.begin(); i != game.kList.end(); ++i) { pxWriteMultiline(writer, i->toString() ); }