Use nullptr instead of 0 or NULL (clang-tidy warns) (#603)

This commit is contained in:
Alexander
2018-07-03 07:59:04 +03:00
committed by Jesse Beder
parent 0f9a586ca1
commit 1698b47b65
9 changed files with 15 additions and 15 deletions

View File

@@ -11,7 +11,7 @@ void* BuildGraphOfNextDocument(Parser& parser,
if (parser.HandleNextDocument(eventHandler)) {
return eventHandler.RootNode();
} else {
return NULL;
return nullptr;
}
}
}

View File

@@ -49,7 +49,7 @@ void GraphBuilderAdapter::OnMapStart(const Mark &mark, const std::string &tag,
EmitterStyle::value /* style */) {
void *pNode = m_builder.NewMap(mark, tag, GetCurrentParent());
m_containers.push(ContainerFrame(pNode, m_pKeyNode));
m_pKeyNode = NULL;
m_pKeyNode = nullptr;
RegisterAnchor(anchor, pNode);
}
@@ -62,7 +62,7 @@ void GraphBuilderAdapter::OnMapEnd() {
void *GraphBuilderAdapter::GetCurrentParent() const {
if (m_containers.empty()) {
return NULL;
return nullptr;
}
return m_containers.top().pContainer;
}
@@ -83,7 +83,7 @@ void GraphBuilderAdapter::DispositionNode(void *pNode) {
if (m_containers.top().isMap()) {
if (m_pKeyNode) {
m_builder.AssignInMap(pContainer, m_pKeyNode, pNode);
m_pKeyNode = NULL;
m_pKeyNode = nullptr;
} else {
m_pKeyNode = pNode;
}

View File

@@ -26,7 +26,7 @@ namespace YAML {
class GraphBuilderAdapter : public EventHandler {
public:
GraphBuilderAdapter(GraphBuilderInterface& builder)
: m_builder(builder), m_pRootNode(NULL), m_pKeyNode(NULL) {}
: m_builder(builder), m_pRootNode(nullptr), m_pKeyNode(nullptr) {}
virtual void OnDocumentStart(const Mark& mark) { (void)mark; }
virtual void OnDocumentEnd() {}