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

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

Issue 150653006: Remove the Vector::append overload that takes a Vector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 10 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
« no previous file with comments | « Source/core/timing/PerformanceUserTiming.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 size_t size() const { return m_nodes.size(); } 43 size_t size() const { return m_nodes.size(); }
44 bool isEmpty() const { return !m_nodes.size(); } 44 bool isEmpty() const { return !m_nodes.size(); }
45 Node* operator[](unsigned i) const { return m_nodes.at(i).get(); } 45 Node* operator[](unsigned i) const { return m_nodes.at(i).get(); }
46 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(n ewCapacity); } 46 void reserveCapacity(size_t newCapacity) { m_nodes.reserveCapacity(n ewCapacity); }
47 void clear() { m_nodes.clear(); } 47 void clear() { m_nodes.clear(); }
48 void swap(NodeSet& other) { std::swap(m_isSorted, other.m_isSorted); std::swap(m_subtreesAreDisjoint, other.m_subtreesAreDisjoint); m_nodes.swap(oth er.m_nodes); } 48 void swap(NodeSet& other) { std::swap(m_isSorted, other.m_isSorted); std::swap(m_subtreesAreDisjoint, other.m_subtreesAreDisjoint); m_nodes.swap(oth er.m_nodes); }
49 49
50 // NodeSet itself does not verify that nodes in it are unique. 50 // NodeSet itself does not verify that nodes in it are unique.
51 void append(Node* node) { m_nodes.append(node); } 51 void append(Node* node) { m_nodes.append(node); }
52 void append(PassRefPtr<Node> node) { m_nodes.append(node); } 52 void append(PassRefPtr<Node> node) { m_nodes.append(node); }
53 void append(const NodeSet& nodeSet) { m_nodes.append(nodeSet.m_nodes ); } 53 void append(const NodeSet& nodeSet) { m_nodes.appendVector(nodeSet.m _nodes); }
54 54
55 // Returns the set's first node in document order, or 0 if the set i s empty. 55 // Returns the set's first node in document order, or 0 if the set i s empty.
56 Node* firstNode() const; 56 Node* firstNode() const;
57 57
58 // Returns 0 if the set is empty. 58 // Returns 0 if the set is empty.
59 Node* anyNode() const; 59 Node* anyNode() const;
60 60
61 // NodeSet itself doesn't check if it contains nodes in document ord er - the caller should tell it if it does not. 61 // NodeSet itself doesn't check if it contains nodes in document ord er - the caller should tell it if it does not.
62 void markSorted(bool isSorted) { m_isSorted = isSorted; } 62 void markSorted(bool isSorted) { m_isSorted = isSorted; }
63 bool isSorted() const { return m_isSorted || m_nodes.size() < 2; } 63 bool isSorted() const { return m_isSorted || m_nodes.size() < 2; }
(...skipping 11 matching lines...) Expand all
75 75
76 bool m_isSorted; 76 bool m_isSorted;
77 bool m_subtreesAreDisjoint; 77 bool m_subtreesAreDisjoint;
78 Vector<RefPtr<Node> > m_nodes; 78 Vector<RefPtr<Node> > m_nodes;
79 }; 79 };
80 80
81 } 81 }
82 } 82 }
83 83
84 #endif // XPathNodeSet_h 84 #endif // XPathNodeSet_h
OLDNEW
« no previous file with comments | « Source/core/timing/PerformanceUserTiming.cpp ('k') | Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698