Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Unified Diff: Source/core/loader/ImageLoader.cpp

Issue 781673002: Use C++11 range-based loop for core/xml and core/loader (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove unnecessary curly brackets Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/ImageLoader.cpp
diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
index 1f66b47338649db2e12c895fc7ff653e73c580ca..ea9a2a52fe836f17183674097542bce75bef7bd0 100644
--- a/Source/core/loader/ImageLoader.cpp
+++ b/Source/core/loader/ImageLoader.cpp
@@ -575,14 +575,11 @@ void ImageLoader::elementDidMoveToNewDocument()
void ImageLoader::sourceImageChanged()
{
#if ENABLE(OILPAN)
- PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClientRemover> >::iterator end = m_clients.end();
- for (PersistentHeapHashMap<WeakMember<ImageLoaderClient>, OwnPtr<ImageLoaderClientRemover> >::iterator it = m_clients.begin(); it != end; ++it) {
- it->key->notifyImageSourceChanged();
- }
+ for (auto& client : m_clients)
+ client.key->notifyImageSourceChanged();
#else
- HashSet<ImageLoaderClient*>::iterator end = m_clients.end();
- for (HashSet<ImageLoaderClient*>::iterator it = m_clients.begin(); it != end; ++it) {
- ImageLoaderClient* handle = *it;
+ for (auto& client : m_clients) {
+ ImageLoaderClient* handle = client;
handle->notifyImageSourceChanged();
}
#endif
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698