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

Unified Diff: Source/core/xml/XPathResult.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/xml/XPathParser.cpp ('k') | Source/core/xml/XSLImportRule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XPathResult.cpp
diff --git a/Source/core/xml/XPathResult.cpp b/Source/core/xml/XPathResult.cpp
index 613a3ed2b76f0df1d93d9a8279768608a91d425b..ad6a5cf3e80349cd8bd6a0a51f6d1af7e2c59869 100644
--- a/Source/core/xml/XPathResult.cpp
+++ b/Source/core/xml/XPathResult.cpp
@@ -155,7 +155,7 @@ Node* XPathResult::singleNodeValue(ExceptionState& exceptionState) const
{
if (resultType() != ANY_UNORDERED_NODE_TYPE && resultType() != FIRST_ORDERED_NODE_TYPE) {
exceptionState.throwTypeError("The result type is not a single node.");
- return 0;
+ return nullptr;
}
const NodeSet& nodes = m_value.toNodeSet(0);
@@ -187,16 +187,16 @@ Node* XPathResult::iterateNext(ExceptionState& exceptionState)
{
if (resultType() != UNORDERED_NODE_ITERATOR_TYPE && resultType() != ORDERED_NODE_ITERATOR_TYPE) {
exceptionState.throwTypeError("The result type is not an iterator.");
- return 0;
+ return nullptr;
}
if (invalidIteratorState()) {
exceptionState.throwDOMException(InvalidStateError, "The document has mutated since the result was returned.");
- return 0;
+ return nullptr;
}
if (m_nodeSetPosition + 1 > nodeSet().size())
- return 0;
+ return nullptr;
Node* node = nodeSet()[m_nodeSetPosition];
@@ -209,12 +209,12 @@ Node* XPathResult::snapshotItem(unsigned index, ExceptionState& exceptionState)
{
if (resultType() != UNORDERED_NODE_SNAPSHOT_TYPE && resultType() != ORDERED_NODE_SNAPSHOT_TYPE) {
exceptionState.throwTypeError("The result type is not a snapshot.");
- return 0;
+ return nullptr;
}
const NodeSet& nodes = m_value.toNodeSet(0);
if (index >= nodes.size())
- return 0;
+ return nullptr;
return nodes[index];
}
« no previous file with comments | « Source/core/xml/XPathParser.cpp ('k') | Source/core/xml/XSLImportRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698