Index: Source/core/dom/ElementData.cpp |
diff --git a/Source/core/dom/ElementData.cpp b/Source/core/dom/ElementData.cpp |
index 8f24cdb5b2c5af7011a45edd42ef5602a482c295..5c005c0c6fb850cdaad9bf7b65fd09940980bf83 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 (const Attribute attribute : attributes) { |
dcheng
2015/01/05 22:01:10
Isn't this copying Attribute? I think this should
zhaoze.zhou
2015/01/09 02:30:05
Done.
|
+ const Attribute* otherAttr = otherAttributes.find(attribute.name()); |
+ if (!otherAttr || attribute.value() != otherAttr->value()) |
return false; |
} |
return true; |