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

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

Issue 1161323007: Use nullptr instead of 0 in xml and xmlhttprequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comment & modified in other files which assigned "0" to ptr. Created 5 years, 6 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/xml/XPathFunctions.cpp ('k') | Source/core/xml/XPathParser.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 * 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 while (from < to) { 256 while (from < to) {
257 m_nodes[from].swap(m_nodes[to]); 257 m_nodes[from].swap(m_nodes[to]);
258 ++from; 258 ++from;
259 --to; 259 --to;
260 } 260 }
261 } 261 }
262 262
263 Node* NodeSet::firstNode() const 263 Node* NodeSet::firstNode() const
264 { 264 {
265 if (isEmpty()) 265 if (isEmpty())
266 return 0; 266 return nullptr;
267 267
268 // FIXME: fully sorting the node-set just to find its first node is 268 // FIXME: fully sorting the node-set just to find its first node is
269 // wasteful. 269 // wasteful.
270 sort(); 270 sort();
271 return m_nodes.at(0).get(); 271 return m_nodes.at(0).get();
272 } 272 }
273 273
274 Node* NodeSet::anyNode() const 274 Node* NodeSet::anyNode() const
275 { 275 {
276 if (isEmpty()) 276 if (isEmpty())
277 return 0; 277 return nullptr;
278 278
279 return m_nodes.at(0).get(); 279 return m_nodes.at(0).get();
280 } 280 }
281 281
282 } 282 }
283 } 283 }
OLDNEW
« no previous file with comments | « Source/core/xml/XPathFunctions.cpp ('k') | Source/core/xml/XPathParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698