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

Unified Diff: Source/core/dom/ElementData.cpp

Issue 796913002: Use C++11 range-based loop for core/clipboard, core/dom and core/testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename variable Created 6 years 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
Index: Source/core/dom/ElementData.cpp
diff --git a/Source/core/dom/ElementData.cpp b/Source/core/dom/ElementData.cpp
index c7c8e6cc052d95f3524ad6369da62f81d69e9623..551ac38ed3653ff30bce2e1dc6367b87f0e56045 100644
--- a/Source/core/dom/ElementData.cpp
+++ b/Source/core/dom/ElementData.cpp
@@ -114,10 +114,9 @@ bool ElementData::isEquivalent(const ElementData* other) const
if (attributes.size() != otherAttributes.size())
return false;
- AttributeCollection::iterator end = attributes.end();
- for (AttributeCollection::iterator it = attributes.begin(); it != end; ++it) {
- const Attribute* otherAttr = otherAttributes.find(it->name());
- if (!otherAttr || it->value() != otherAttr->value())
+ for (auto attribute : attributes) {
dcheng 2014/12/16 19:52:51 Please don't use bare 'auto'; without looking at A
zhaoze.zhou 2014/12/16 23:27:57 Done.
+ const Attribute* otherAttr = otherAttributes.find(attribute.name());
+ if (!otherAttr || attribute.value() != otherAttr->value())
return false;
}
return true;

Powered by Google App Engine
This is Rietveld 408576698