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

Unified Diff: third_party/WebKit/Source/core/xml/XPathNodeSet.cpp

Issue 2617783002: Migrate WTF::Vector::append() to ::push_back() [part 12 of N] (Closed)
Patch Set: rebase Created 3 years, 11 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 | « third_party/WebKit/Source/core/xml/XPathNodeSet.h ('k') | third_party/WebKit/Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
diff --git a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
index 2280112d9e30e3925f709a7f8733f4d959d187c5..e0995346c85944a945e2234e7d8c649c45ea89a2 100644
--- a/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathNodeSet.cpp
@@ -176,14 +176,14 @@ void NodeSet::sort() const {
for (unsigned i = 0; i < nodeCount; ++i) {
NodeSetVector& parentsVector = parentMatrix[i];
Node* n = m_nodes[i].get();
- parentsVector.append(n);
+ parentsVector.push_back(n);
if (n->isAttributeNode()) {
n = toAttr(n)->ownerElement();
- parentsVector.append(n);
+ parentsVector.push_back(n);
containsAttributeNodes = true;
}
for (n = n->parentNode(); n; n = n->parentNode())
- parentsVector.append(n);
+ parentsVector.push_back(n);
}
sortBlock(0, nodeCount, parentMatrix, containsAttributeNodes);
@@ -192,7 +192,7 @@ void NodeSet::sort() const {
HeapVector<Member<Node>> sortedNodes;
sortedNodes.reserveInitialCapacity(nodeCount);
for (unsigned i = 0; i < nodeCount; ++i)
- sortedNodes.append(parentMatrix[i][0]);
+ sortedNodes.push_back(parentMatrix[i][0]);
const_cast<HeapVector<Member<Node>>&>(m_nodes).swap(sortedNodes);
}
@@ -227,7 +227,7 @@ void NodeSet::traversalSort() const {
for (Node& n : NodeTraversal::startsAt(*findRootNode(m_nodes.front()))) {
if (nodes.contains(&n))
- sortedNodes.append(&n);
+ sortedNodes.push_back(&n);
if (!containsAttributeNodes || !n.isElementNode())
continue;
@@ -237,7 +237,7 @@ void NodeSet::traversalSort() const {
for (auto& attribute : attributes) {
Attr* attr = element->attrIfExists(attribute.name());
if (attr && nodes.contains(attr))
- sortedNodes.append(attr);
+ sortedNodes.push_back(attr);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathNodeSet.h ('k') | third_party/WebKit/Source/core/xml/XPathPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698