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

Unified Diff: Source/core/css/FontLoader.cpp

Issue 645743003: Use C++11 range-based loop for core/css (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: better variable names Created 6 years, 2 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/css/FontFaceSet.cpp ('k') | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontLoader.cpp
diff --git a/Source/core/css/FontLoader.cpp b/Source/core/css/FontLoader.cpp
index b52c7e6d8aa51cb24b7059053e17061ca5cf04f7..79fc64af05c4b5aa6d4a670514c16dfde2fb69f2 100644
--- a/Source/core/css/FontLoader.cpp
+++ b/Source/core/css/FontLoader.cpp
@@ -55,8 +55,8 @@ void FontLoader::loadPendingFonts()
FontsToLoadVector fontsToBeginLoading;
fontsToBeginLoading.swap(m_fontsToBeginLoading);
- for (FontsToLoadVector::iterator it = fontsToBeginLoading.begin(); it != fontsToBeginLoading.end(); ++it) {
- FontResource* fontResource = it->first.get();
+ for (const auto& item : fontsToBeginLoading) {
+ FontResource* fontResource = item.first.get();
fontResource->beginLoadIfNeeded(m_resourceFetcher);
}
@@ -88,8 +88,8 @@ void FontLoader::clearResourceFetcherAndFontSelector()
void FontLoader::clearPendingFonts()
{
- for (FontsToLoadVector::iterator it = m_fontsToBeginLoading.begin(); it != m_fontsToBeginLoading.end(); ++it)
- it->first->didUnscheduleLoad();
+ for (const auto& item : m_fontsToBeginLoading)
+ item.first->didUnscheduleLoad();
m_fontsToBeginLoading.clear();
}
« no previous file with comments | « Source/core/css/FontFaceSet.cpp ('k') | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698