From 36d326e8b0866df4e70f81c2aa0a2e19d544399c Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 21 Jun 2017 21:10:00 +0200 Subject: Use nullptr instead of zero (0) as the null pointer constant --- src/zmq/zmqabstractnotifier.h | 2 +- src/zmq/zmqnotificationinterface.cpp | 2 +- src/zmq/zmqpublishnotifier.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/zmq') diff --git a/src/zmq/zmqabstractnotifier.h b/src/zmq/zmqabstractnotifier.h index 77cf5141e2..7828822149 100644 --- a/src/zmq/zmqabstractnotifier.h +++ b/src/zmq/zmqabstractnotifier.h @@ -15,7 +15,7 @@ typedef CZMQAbstractNotifier* (*CZMQNotifierFactory)(); class CZMQAbstractNotifier { public: - CZMQAbstractNotifier() : psocket(0) { } + CZMQAbstractNotifier() : psocket(nullptr) { } virtual ~CZMQAbstractNotifier(); template diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp index c410cc269f..9909395d84 100644 --- a/src/zmq/zmqnotificationinterface.cpp +++ b/src/zmq/zmqnotificationinterface.cpp @@ -120,7 +120,7 @@ void CZMQNotificationInterface::Shutdown() } zmq_ctx_destroy(pcontext); - pcontext = 0; + pcontext = nullptr; } } diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp index 700c39f66e..ab54e2bb8b 100644 --- a/src/zmq/zmqpublishnotifier.cpp +++ b/src/zmq/zmqpublishnotifier.cpp @@ -126,7 +126,7 @@ void CZMQAbstractPublishNotifier::Shutdown() zmq_close(psocket); } - psocket = 0; + psocket = nullptr; } bool CZMQAbstractPublishNotifier::SendMessage(const char *command, const void* data, size_t size) @@ -136,7 +136,7 @@ bool CZMQAbstractPublishNotifier::SendMessage(const char *command, const void* d /* send three parts, command & data & a LE 4byte sequence number */ unsigned char msgseq[sizeof(uint32_t)]; WriteLE32(&msgseq[0], nSequence); - int rc = zmq_send_multipart(psocket, command, strlen(command), data, size, msgseq, (size_t)sizeof(uint32_t), (void*)0); + int rc = zmq_send_multipart(psocket, command, strlen(command), data, size, msgseq, (size_t)sizeof(uint32_t), nullptr); if (rc == -1) return false; -- cgit v1.2.3