Chromium Code Reviews| Index: Source/core/dom/ElementData.cpp |
| diff --git a/Source/core/dom/ElementData.cpp b/Source/core/dom/ElementData.cpp |
| index c7c8e6cc052d95f3524ad6369da62f81d69e9623..a31f0c52dadfbecf41ccdbafa643af4c90c4b445 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) { |
|
Julien - ping for review
2015/01/02 09:42:02
const auto&
or better:
const Attribute*
zhaoze.zhou
2015/01/05 15:17:57
Done.
|
| + const Attribute* otherAttr = otherAttributes.find(attribute.name()); |
| + if (!otherAttr || attribute.value() != otherAttr->value()) |
| return false; |
| } |
| return true; |