Start using auto keyword for loops.
Created attachment 234343 [details] Patch
Comment on attachment 234343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234343&action=review If you’re going to touch all these loops, then you should clean them up even more using C++11 syntax and the functions like keys() and values() for simple iterations of maps. Example: > Source/WebCore/platform/graphics/TiledBackingStore.cpp:118 > - TileMap::iterator end = m_tiles.end(); > - for (TileMap::iterator it = m_tiles.begin(); it != end; ++it) { > + for (auto it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) { > if (!it->value->isDirty()) > continue; > dirtyTiles.append(it->value); for (auto& tile : m_tiles.values()) { if (tile->isDirty()) dirtyTiles.append(tile); } > Source/WebCore/platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:239 > + for (auto iter = m_imageBackings.begin(), end = m_imageBackings.end(); iter != end; ++iter) > iter->value->update(); for (auto& backing : m_imageBackings.values()) backing->update(); > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:82 > + for (auto it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) > m_tilesToRemove.add(it->key); for (auto& key : m_tiles.keys()) m_tilesToRemove.add(key); > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:563 > + for (auto it = m_backingStoresWithPendingBuffers.begin(), end = m_backingStoresWithPendingBuffers.end(); it != end; ++it) > (*it)->commitTileOperations(m_textureMapper.get()); for (auto& store : m_backingStoresWithPendingBuffers) store->commitTileOperations(m_textureMapper.get());
Created attachment 234387 [details] I used the more C++11 syntax to clean-up for loops by your guide. Thanks Darin.
Comment on attachment 234387 [details] I used the more C++11 syntax to clean-up for loops by your guide. Thanks Darin. Clearing flags on attachment: 234387 Committed r170813: <http://trac.webkit.org/changeset/170813>
All reviewed patches have been landed. Closing bug.