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

Unified Diff: Source/core/html/CollectionIndexCache.h

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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 | « no previous file | Source/core/html/FormAssociatedElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/CollectionIndexCache.h
diff --git a/Source/core/html/CollectionIndexCache.h b/Source/core/html/CollectionIndexCache.h
index ba7843d9b6b294d0fb8587a8f9320cd57bfdc8a7..297738c79621939af94b0a5aab3443c98c6b54cf 100644
--- a/Source/core/html/CollectionIndexCache.h
+++ b/Source/core/html/CollectionIndexCache.h
@@ -127,7 +127,7 @@ template <typename Collection, typename NodeType>
inline NodeType* CollectionIndexCache<Collection, NodeType>::nodeAt(const Collection& collection, unsigned index)
{
if (isCachedNodeCountValid() && index >= cachedNodeCount())
- return 0;
+ return nullptr;
if (cachedNode()) {
if (index > cachedNodeIndex())
@@ -143,7 +143,7 @@ inline NodeType* CollectionIndexCache<Collection, NodeType>::nodeAt(const Collec
if (!firstNode) {
// The collection is empty.
setCachedNodeCount(0);
- return 0;
+ return nullptr;
}
setCachedNode(firstNode, 0);
return index ? nodeAfterCachedNode(collection, index) : firstNode;
@@ -196,7 +196,7 @@ inline NodeType* CollectionIndexCache<Collection, NodeType>::nodeAfterCachedNode
if (!currentNode) {
// Did not find the node. On plus side, we now know the length.
setCachedNodeCount(currentIndex + 1);
- return 0;
+ return nullptr;
}
setCachedNode(currentNode, currentIndex);
return currentNode;
« no previous file with comments | « no previous file | Source/core/html/FormAssociatedElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698