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

Unified Diff: core/fxcrt/fx_basic_list.cpp

Issue 2032613003: Get rid of NULLs in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix a bad merge Created 4 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 | « core/fxcrt/fx_basic_gcc.cpp ('k') | core/fxcrt/fx_basic_maps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_basic_list.cpp
diff --git a/core/fxcrt/fx_basic_list.cpp b/core/fxcrt/fx_basic_list.cpp
index f128176d00a8e46ecc6cae3ae5680697919dcdb8..53e0621a6e645d5d3d07a0a37592753b161470eb 100644
--- a/core/fxcrt/fx_basic_list.cpp
+++ b/core/fxcrt/fx_basic_list.cpp
@@ -8,14 +8,14 @@
#include "core/fxcrt/plex.h"
CFX_PtrList::CFX_PtrList(int nBlockSize)
- : m_pNodeHead(NULL),
- m_pNodeTail(NULL),
+ : m_pNodeHead(nullptr),
+ m_pNodeTail(nullptr),
m_nCount(0),
- m_pNodeFree(NULL),
- m_pBlocks(NULL),
+ m_pNodeFree(nullptr),
+ m_pBlocks(nullptr),
m_nBlockSize(nBlockSize) {}
FX_POSITION CFX_PtrList::AddTail(void* newElement) {
- CNode* pNewNode = NewNode(m_pNodeTail, NULL);
+ CNode* pNewNode = NewNode(m_pNodeTail, nullptr);
pNewNode->data = newElement;
if (m_pNodeTail) {
m_pNodeTail->pNext = pNewNode;
@@ -26,7 +26,7 @@ FX_POSITION CFX_PtrList::AddTail(void* newElement) {
return (FX_POSITION)pNewNode;
}
FX_POSITION CFX_PtrList::AddHead(void* newElement) {
- CNode* pNewNode = NewNode(NULL, m_pNodeHead);
+ CNode* pNewNode = NewNode(nullptr, m_pNodeHead);
pNewNode->data = newElement;
if (m_pNodeHead) {
m_pNodeHead->pPrev = pNewNode;
@@ -112,7 +112,7 @@ CFX_PtrList::~CFX_PtrList() {
}
FX_POSITION CFX_PtrList::FindIndex(int nIndex) const {
if (nIndex >= m_nCount || nIndex < 0) {
- return NULL;
+ return nullptr;
}
CNode* pNode = m_pNodeHead;
while (nIndex--) {
@@ -127,5 +127,5 @@ FX_POSITION CFX_PtrList::Find(void* searchValue, FX_POSITION startAfter) const {
if (pNode->data == searchValue)
return (FX_POSITION)pNode;
}
- return NULL;
+ return nullptr;
}
« no previous file with comments | « core/fxcrt/fx_basic_gcc.cpp ('k') | core/fxcrt/fx_basic_maps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698