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

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

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference Created 3 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
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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 parentMatrix[i].swap(parentMatrix[groupEnd++]); 141 parentMatrix[i].swap(parentMatrix[groupEnd++]);
142 } 142 }
143 143
144 if (groupEnd - previousGroupEnd > 1) 144 if (groupEnd - previousGroupEnd > 1)
145 sortBlock(previousGroupEnd, groupEnd, parentMatrix, 145 sortBlock(previousGroupEnd, groupEnd, parentMatrix,
146 mayContainAttributeNodes); 146 mayContainAttributeNodes);
147 147
148 DCHECK_NE(previousGroupEnd, groupEnd); 148 DCHECK_NE(previousGroupEnd, groupEnd);
149 previousGroupEnd = groupEnd; 149 previousGroupEnd = groupEnd;
150 #if DCHECK_IS_ON() 150 #if DCHECK_IS_ON()
151 parentNodes.remove(n); 151 parentNodes.erase(n);
152 #endif 152 #endif
153 } 153 }
154 } 154 }
155 155
156 DCHECK(parentNodes.isEmpty()); 156 DCHECK(parentNodes.isEmpty());
157 } 157 }
158 158
159 void NodeSet::sort() const { 159 void NodeSet::sort() const {
160 if (m_isSorted) 160 if (m_isSorted)
161 return; 161 return;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 Node* NodeSet::anyNode() const { 272 Node* NodeSet::anyNode() const {
273 if (isEmpty()) 273 if (isEmpty())
274 return nullptr; 274 return nullptr;
275 275
276 return m_nodes.at(0).get(); 276 return m_nodes.at(0).get();
277 } 277 }
278 278
279 } // namespace XPath 279 } // namespace XPath
280 } // namespace blink 280 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.cpp ('k') | third_party/WebKit/Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698