summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-08-12 08:12:53 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-08-12 08:12:53 +0000
commitc0df993c8f919be748f032ff6a695fc8ad5be056 (patch)
tree0cf2e9b6c9af811a958aed2204c74eda9b8b6f04 /protocols/VKontakte/src/misc.cpp
parent2eb921fdbae7be508cdd3e20c67760384d84348e (diff)
VKontakte: Code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@14922 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index e9ef416b76..281447f3f5 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -846,7 +846,7 @@ CMString CVkProto::GetVkPhotoItem(const JSONNode &jnPhoto, BBCSupport iBBC)
CMString tszLink, tszPreviewLink;
for (int i = 0; i < _countof(szImageTypes); i++) {
const JSONNode &n = jnPhoto[szImageTypes[i]];
- if (!n.isnull()) {
+ if (n) {
tszLink = n.as_mstring();
break;
}
@@ -1029,7 +1029,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
tszText.IsEmpty() ? _T(" ") : tszText);
const JSONNode &jnSubAttachments = jnWall["attachments"];
- if (!jnSubAttachments.isnull()) {
+ if (jnSubAttachments) {
debugLogA("CVkProto::GetAttachmentDescr SubAttachments");
CMString tszAttachmentDescr = GetAttachmentDescr(jnSubAttachments, iBBC);
tszAttachmentDescr.Replace(_T("\n"), _T("\n\t"));
@@ -1050,7 +1050,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszLink;
for (int i = 0; i < _countof(szImageTypes); i++) {
const JSONNode &n = jnSticker[szImageTypes[i]];
- if (!n.isnull()) {
+ if (n) {
tszLink = n.as_mstring();
break;
}
@@ -1088,7 +1088,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszLink;
for (int i = 0; i < _countof(szGiftTypes); i++) {
const JSONNode &n = jnGift[szGiftTypes[i]];
- if (!n.isnull()) {
+ if (n) {
tszLink = n.as_mstring();
break;
}
@@ -1141,7 +1141,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, BBCSupport iBBC)
CMString tszBody(jnMsg["body"].as_mstring());
const JSONNode &jnFwdMessages = jnMsg["fwd_messages"];
- if (!jnFwdMessages.isnull()) {
+ if (jnFwdMessages) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, iBBC == bbcNo ? iBBC : m_iBBCForAttachments);
if (!tszBody.IsEmpty())
tszFwdMessages = _T("\n") + tszFwdMessages;
@@ -1149,7 +1149,7 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, BBCSupport iBBC)
}
const JSONNode &jnAttachments = jnMsg["attachments"];
- if (!jnAttachments.isnull()) {
+ if (jnAttachments) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, iBBC == bbcNo ? iBBC : m_iBBCForAttachments);
if (!tszBody.IsEmpty())
tszAttachmentDescr = _T("\n") + tszAttachmentDescr;