summaryrefslogtreecommitdiff
path: root/protocols/MinecraftDynmap/src/proto.cpp
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:03:31 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-13 15:07:33 +0100
commita7c24ca48995cf2bf436156302f96b91bf135409 (patch)
tree953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/MinecraftDynmap/src/proto.cpp
parent591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff)
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/MinecraftDynmap/src/proto.cpp')
-rw-r--r--protocols/MinecraftDynmap/src/proto.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp
index 83a05652d2..3aaa6ab022 100644
--- a/protocols/MinecraftDynmap/src/proto.cpp
+++ b/protocols/MinecraftDynmap/src/proto.cpp
@@ -23,14 +23,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t* username) :
- PROTO<MinecraftDynmapProto>(proto_name, username), m_interval(0), hConnection(0), hEventsConnection(0),
+ PROTO<MinecraftDynmapProto>(proto_name, username), m_interval(0), hConnection(nullptr), hEventsConnection(nullptr),
m_updateRate(5000), m_nick("")
{
- this->signon_lock_ = CreateMutex(NULL, FALSE, NULL);
- this->send_message_lock_ = CreateMutex(NULL, FALSE, NULL);
- this->connection_lock_ = CreateMutex(NULL, FALSE, NULL);
- this->events_loop_lock_ = CreateMutex(NULL, FALSE, NULL);
- this->events_loop_event_ = CreateEvent(NULL, FALSE, FALSE, NULL);
+ this->signon_lock_ = CreateMutex(nullptr, FALSE, nullptr);
+ this->send_message_lock_ = CreateMutex(nullptr, FALSE, nullptr);
+ this->connection_lock_ = CreateMutex(nullptr, FALSE, nullptr);
+ this->events_loop_lock_ = CreateMutex(nullptr, FALSE, nullptr);
+ this->events_loop_event_ = CreateEvent(nullptr, FALSE, FALSE, nullptr);
// Group chats
CreateProtoService(PS_JOINCHAT, &MinecraftDynmapProto::OnJoinChat);
@@ -50,15 +50,15 @@ MinecraftDynmapProto::MinecraftDynmapProto(const char* proto_name, const wchar_t
nlu.szSettingsModule = m_szModuleName;
nlu.szDescriptiveName.w = descr;
m_hNetlibUser = Netlib_RegisterUser(&nlu);
- if (m_hNetlibUser == NULL) {
+ if (m_hNetlibUser == nullptr) {
wchar_t error[200];
mir_snwprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
- MessageBox(NULL, error, L"Miranda NG", MB_OK | MB_ICONERROR);
+ MessageBox(nullptr, error, L"Miranda NG", MB_OK | MB_ICONERROR);
}
// Client instantiation
this->error_count_ = 0;
- this->chatHandle_ = NULL;
+ this->chatHandle_ = nullptr;
}
MinecraftDynmapProto::~MinecraftDynmapProto()