summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_avatars.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-09-07 14:13:13 +0500
committerElzorFox <elzorfox@ya.ru>2017-09-07 14:13:13 +0500
commitd8beb3088e4394614f48636416cc363227194a24 (patch)
treefd867681acec263b5396f0fda10cc1edd442ae28 /protocols/VKontakte/src/vk_avatars.cpp
parente7179d7a6ec6299a11e0f51e6c92ae5ba22144d2 (diff)
VKontakte: code cleaning
Diffstat (limited to 'protocols/VKontakte/src/vk_avatars.cpp')
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index 10a4ef810a..b569d59b9a 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -28,10 +28,10 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
ai.format = ProtoGetBufferFormat(reply->pData);
FILE *out = _wfopen(ai.filename, L"wb");
- if (out == NULL) {
+ if (out == nullptr) {
ProtoBroadcastAck(param->hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, &ai);
delete param;
- pReq->pUserInfo = NULL;
+ pReq->pUserInfo = nullptr;
return;
}
@@ -40,7 +40,7 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
setByte(param->hContact, "NeedNewAvatar", 0);
ProtoBroadcastAck(param->hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &ai);
delete param;
- pReq->pUserInfo = NULL;
+ pReq->pUserInfo = nullptr;
}
INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
@@ -82,7 +82,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)
PROTO_AVATAR_INFORMATION *pai = (PROTO_AVATAR_INFORMATION *)lParam;
ptrA szUrl(getStringA(pai->hContact, "AvatarUrl"));
- if (szUrl == NULL)
+ if (szUrl == nullptr)
return GAIR_NOAVATAR;
wchar_t wszFileName[MAX_PATH];
@@ -142,7 +142,7 @@ void CVkProto::GetAvatarFileName(MCONTACT hContact, wchar_t *pwszDest, size_t cb
ptrW wszUrl(getWStringA(hContact, "AvatarUrl"));
if (wszUrl) {
wchar_t *p = wcsrchr(wszUrl, '.');
- if (p != NULL)
+ if (p != nullptr)
szFileType = p;
}
@@ -159,11 +159,11 @@ void CVkProto::SetAvatarUrl(MCONTACT hContact, CMStringW &wszUrl)
if (wszUrl.IsEmpty()) {
delSetting(hContact, "AvatarUrl");
- ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, NULL);
+ ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, nullptr);
}
else {
setWString(hContact, "AvatarUrl", wszUrl);
- setByte(hContact,"NeedNewAvatar", 1);
+ setByte(hContact, "NeedNewAvatar", 1);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
GetAvatarFileName(ai.hContact, ai.filename, _countof(ai.filename));