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

Unified Diff: Source/core/css/SelectorChecker.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/SelectorChecker.h ('k') | Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/SelectorChecker.cpp
diff --git a/Source/core/css/SelectorChecker.cpp b/Source/core/css/SelectorChecker.cpp
index bb479886159e9b16a0a9756ee411dd8844b9e1f6..a79432c299c818969626fcd41b98b8947efd7c27 100644
--- a/Source/core/css/SelectorChecker.cpp
+++ b/Source/core/css/SelectorChecker.cpp
@@ -467,10 +467,7 @@ static bool anyAttributeMatches(Element& element, CSSSelector::Match match, cons
bool caseInsensitive = selector.attributeMatchType() == CSSSelector::CaseInsensitive;
AttributeCollection attributes = element.attributesWithoutUpdate();
- AttributeCollection::iterator end = attributes.end();
- for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it) {
- const Attribute& attributeItem = *it;
-
+ for (const auto& attributeItem: attributes) {
if (!attributeItem.matches(selectorAttr))
continue;
« no previous file with comments | « Source/core/css/SelectorChecker.h ('k') | Source/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698