From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/Dropbox/src/dropbox_utils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Dropbox/src/dropbox_utils.cpp') diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 39b76a9f2e..a4e5d51747 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -2,7 +2,7 @@ char* CDropbox::PreparePath(const char *oldPath, char *newPath) { - if (oldPath == NULL) + if (oldPath == nullptr) mir_strcpy(newPath, ""); else if (*oldPath != '/') { @@ -24,7 +24,7 @@ char* CDropbox::PreparePath(const wchar_t *oldPath, char *newPath) bool CDropbox::IsAccountIntercepted(const char *module) { const char *interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedAccounts"); - if (interceptedAccounts == NULL) + if (interceptedAccounts == nullptr) interceptedAccounts = db_get_sa(NULL, MODULE, "InterceptedProtos"); return interceptedAccounts && strstr(interceptedAccounts, module); } @@ -59,7 +59,7 @@ char* CDropbox::HttpStatusToText(HTTP_STATUS status) void CDropbox::HandleHttpResponse(NETLIBHTTPREQUEST *response) { - if (response == NULL) + if (response == nullptr) throw DropboxException(HttpStatusToText(HTTP_STATUS_ERROR)); } @@ -91,7 +91,7 @@ MEVENT CDropbox::AddEventToDb(MCONTACT hContact, WORD type, DWORD flags, DWORD c { DBEVENTINFO dbei = {}; dbei.szModule = MODULE; - dbei.timestamp = time(NULL); + dbei.timestamp = time(nullptr); dbei.eventType = type; dbei.cbBlob = cbBlob; dbei.pBlob = pBlob; @@ -126,7 +126,7 @@ void CDropbox::PasteToInputArea(MCONTACT hContact, const wchar_t *data) void CDropbox::PasteToClipboard(const wchar_t *data) { - if (OpenClipboard(NULL)) { + if (OpenClipboard(nullptr)) { EmptyClipboard(); size_t size = sizeof(wchar_t) * (mir_wstrlen(data) + 1); -- cgit v1.2.3