From 4997b22f84307521a62838f874928bf56cd3423c Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 7 Jun 2016 10:46:22 -0700 Subject: Get rid of NULLs in core/ Review-Url: https://codereview.chromium.org/2032613003 --- core/fxcrt/fx_basic_list.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/fxcrt/fx_basic_list.cpp') diff --git a/core/fxcrt/fx_basic_list.cpp b/core/fxcrt/fx_basic_list.cpp index f128176d00..53e0621a6e 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; } -- cgit v1.2.3