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

Unified Diff: Source/core/css/CSSGridTemplateAreasValue.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/CSSCrossfadeValue.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGridTemplateAreasValue.cpp
diff --git a/Source/core/css/CSSGridTemplateAreasValue.cpp b/Source/core/css/CSSGridTemplateAreasValue.cpp
index 144cea0294c83f215a60be904de909c7e63f8b00..5f527b15663f0ca49f86b4bda35f84610b8a0724 100644
--- a/Source/core/css/CSSGridTemplateAreasValue.cpp
+++ b/Source/core/css/CSSGridTemplateAreasValue.cpp
@@ -49,18 +49,16 @@ static String stringForPosition(const NamedGridAreaMap& gridAreaMap, size_t row,
{
Vector<String> candidates;
- NamedGridAreaMap::const_iterator end = gridAreaMap.end();
- for (NamedGridAreaMap::const_iterator it = gridAreaMap.begin(); it != end; ++it) {
- const GridCoordinate& coordinate = it->value;
+ for (const auto& item : gridAreaMap) {
+ const GridCoordinate& coordinate = item.value;
if (row >= coordinate.rows.resolvedInitialPosition.toInt() && row <= coordinate.rows.resolvedFinalPosition.toInt())
- candidates.append(it->key);
+ candidates.append(item.key);
}
- end = gridAreaMap.end();
- for (NamedGridAreaMap::const_iterator it = gridAreaMap.begin(); it != end; ++it) {
- const GridCoordinate& coordinate = it->value;
- if (column >= coordinate.columns.resolvedInitialPosition.toInt() && column <= coordinate.columns.resolvedFinalPosition.toInt() && candidates.contains(it->key))
- return it->key;
+ for (const auto& item : gridAreaMap) {
+ const GridCoordinate& coordinate = item.value;
+ if (column >= coordinate.columns.resolvedInitialPosition.toInt() && column <= coordinate.columns.resolvedFinalPosition.toInt() && candidates.contains(item.key))
+ return item.key;
}
return ".";
« no previous file with comments | « Source/core/css/CSSCrossfadeValue.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698