From 3dca8668b1f1127b24e2800c46052078657b6d5a Mon Sep 17 00:00:00 2001 From: Ted Lyngmo Date: Tue, 21 Jan 2020 00:14:55 +0100 Subject: [PATCH] Change NULL to nullptr (#805) --- include/yaml-cpp/contrib/graphbuilder.h | 8 ++++---- include/yaml-cpp/node/detail/node.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/yaml-cpp/contrib/graphbuilder.h b/include/yaml-cpp/contrib/graphbuilder.h index f0a38f2..dbffd92 100644 --- a/include/yaml-cpp/contrib/graphbuilder.h +++ b/include/yaml-cpp/contrib/graphbuilder.h @@ -15,7 +15,7 @@ class Parser; // GraphBuilderInterface // . Abstraction of node creation -// . pParentNode is always NULL or the return value of one of the NewXXX() +// . pParentNode is always nullptr or the return value of one of the NewXXX() // functions. class GraphBuilderInterface { public: @@ -73,9 +73,9 @@ class GraphBuilder : public GraphBuilderInterface { typedef typename Impl::Map Map; GraphBuilder(Impl &impl) : m_impl(impl) { - Map *pMap = NULL; - Sequence *pSeq = NULL; - Node *pNode = NULL; + Map *pMap = nullptr; + Sequence *pSeq = nullptr; + Node *pNode = nullptr; // Type consistency checks pNode = pMap; diff --git a/include/yaml-cpp/node/detail/node.h b/include/yaml-cpp/node/detail/node.h index fcd72da..0be7ebb 100644 --- a/include/yaml-cpp/node/detail/node.h +++ b/include/yaml-cpp/node/detail/node.h @@ -119,7 +119,7 @@ class node { template node* get(const Key& key, shared_memory_holder pMemory) const { // NOTE: this returns a non-const node so that the top-level Node can wrap - // it, and returns a pointer so that it can be NULL (if there is no such + // it, and returns a pointer so that it can be nullptr (if there is no such // key). return static_cast(*m_pRef).get(key, pMemory); } @@ -136,7 +136,7 @@ class node { node* get(node& key, shared_memory_holder pMemory) const { // NOTE: this returns a non-const node so that the top-level Node can wrap - // it, and returns a pointer so that it can be NULL (if there is no such + // it, and returns a pointer so that it can be nullptr (if there is no such // key). return static_cast(*m_pRef).get(key, pMemory); }