diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/Dropbox/src/dropbox_utils.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/Dropbox/src/dropbox_utils.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_utils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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);
|