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

Side by Side Diff: third_party/WebKit/Source/core/xml/XPathNodeSet.h

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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 m_nodes.reserveCapacity(newCapacity); 53 m_nodes.reserveCapacity(newCapacity);
54 } 54 }
55 void clear() { m_nodes.clear(); } 55 void clear() { m_nodes.clear(); }
56 void swap(NodeSet& other) { 56 void swap(NodeSet& other) {
57 std::swap(m_isSorted, other.m_isSorted); 57 std::swap(m_isSorted, other.m_isSorted);
58 std::swap(m_subtreesAreDisjoint, other.m_subtreesAreDisjoint); 58 std::swap(m_subtreesAreDisjoint, other.m_subtreesAreDisjoint);
59 m_nodes.swap(other.m_nodes); 59 m_nodes.swap(other.m_nodes);
60 } 60 }
61 61
62 // NodeSet itself does not verify that nodes in it are unique. 62 // NodeSet itself does not verify that nodes in it are unique.
63 void append(Node* node) { m_nodes.append(node); } 63 void append(Node* node) { m_nodes.push_back(node); }
64 void append(const NodeSet& nodeSet) { m_nodes.appendVector(nodeSet.m_nodes); } 64 void append(const NodeSet& nodeSet) { m_nodes.appendVector(nodeSet.m_nodes); }
65 65
66 // Returns the set's first node in document order, or 0 if the set is empty. 66 // Returns the set's first node in document order, or 0 if the set is empty.
67 Node* firstNode() const; 67 Node* firstNode() const;
68 68
69 // Returns 0 if the set is empty. 69 // Returns 0 if the set is empty.
70 Node* anyNode() const; 70 Node* anyNode() const;
71 71
72 // NodeSet itself doesn't check if it contains nodes in document order - the 72 // NodeSet itself doesn't check if it contains nodes in document order - the
73 // caller should tell it if it does not. 73 // caller should tell it if it does not.
(...skipping 17 matching lines...) Expand all
91 91
92 bool m_isSorted; 92 bool m_isSorted;
93 bool m_subtreesAreDisjoint; 93 bool m_subtreesAreDisjoint;
94 HeapVector<Member<Node>> m_nodes; 94 HeapVector<Member<Node>> m_nodes;
95 }; 95 };
96 96
97 } // namespace XPath 97 } // namespace XPath
98 98
99 } // namespace blink 99 } // namespace blink
100 #endif // XPathNodeSet_h 100 #endif // XPathNodeSet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/XPathFunctionsTest.cpp ('k') | third_party/WebKit/Source/core/xml/XPathNodeSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698