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

Unified Diff: Source/core/css/FontFaceCache.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/ElementRuleCollector.h ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFaceCache.cpp
diff --git a/Source/core/css/FontFaceCache.cpp b/Source/core/css/FontFaceCache.cpp
index e29acc2fcac025d44e24b1ccb40dd870e9065040..1961f12ee4f8ef1bb53c6c645de8f62d65c2bbeb 100644
--- a/Source/core/css/FontFaceCache.cpp
+++ b/Source/core/css/FontFaceCache.cpp
@@ -109,8 +109,8 @@ void FontFaceCache::removeFontFace(FontFace* fontFace, bool cssConnected)
void FontFaceCache::clearCSSConnected()
{
- for (StyleRuleToFontFace::iterator it = m_styleRuleToFontFace.begin(); it != m_styleRuleToFontFace.end(); ++it)
- removeFontFace(it->value.get(), true);
+ for (const auto& item : m_styleRuleToFontFace)
+ removeFontFace(item.value.get(), true);
m_styleRuleToFontFace.clear();
}
@@ -212,8 +212,8 @@ CSSSegmentedFontFace* FontFaceCache::get(const FontDescription& fontDescription,
FontTraits traits = fontDescription.traits();
TraitsMap::AddResult faceResult = traitsResult.storedValue->value->add(traits.bitfield(), nullptr);
if (!faceResult.storedValue->value) {
- for (TraitsMap::const_iterator i = familyFontFaces->begin(); i != familyFontFaces->end(); ++i) {
- CSSSegmentedFontFace* candidate = i->value.get();
+ for (const auto& item : *familyFontFaces) {
+ CSSSegmentedFontFace* candidate = item.value.get();
FontTraits candidateTraits = candidate->traits();
if (traits.style() == FontStyleNormal && candidateTraits.style() != FontStyleNormal)
continue;
« no previous file with comments | « Source/core/css/ElementRuleCollector.h ('k') | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698