From 94c711953d71b21e4cc4c950dec921b253ae0d54 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Mar 2018 21:16:04 +0300 Subject: Jabber: code cleaning & simplification --- protocols/JabberG/src/jabber_misc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/JabberG/src/jabber_misc.cpp') diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 7c1c4a0b5b..784364c502 100755 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -108,12 +108,12 @@ BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType) case JABBER_DB_EVENT_PRESENCE_SUBSCRIBED: case JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE: case JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED: - if (!m_options.LogPresence) + if (!m_bLogPresence) return FALSE; break; case JABBER_DB_EVENT_PRESENCE_ERROR: - if (!m_options.LogPresenceErrors) + if (!m_bLogPresenceErrors) return FALSE; break; } @@ -330,7 +330,7 @@ void CJabberProto::FormatMirVer(const pResourceStatus &resource, CMStringW &res) } if (resource->m_tszResourceName && !wcsstr(res, resource->m_tszResourceName)) - if (wcsstr(res, L"Miranda IM") || wcsstr(res, L"Miranda NG") || m_options.ShowForeignResourceInMirVer) + if (wcsstr(res, L"Miranda IM") || wcsstr(res, L"Miranda NG") || m_bShowForeignResourceInMirVer) res.AppendFormat(L" [%s]", resource->m_tszResourceName); } @@ -444,7 +444,7 @@ void CJabberProto::MsgPopup(MCONTACT hContact, const wchar_t *szMsg, const wchar CMStringW CJabberProto::ExtractImage(HXML node) { HXML nHtml, nBody, nImg; - LPCTSTR src; + const wchar_t *src; CMStringW link; if ((nHtml = XmlGetChild(node, "html")) != nullptr && @@ -478,7 +478,7 @@ CMStringW CJabberProto::ExtractImage(HXML node) DWORD n; size_t bufferLen; ptrA buffer((char*)mir_base64_decode(_T2A(image), &bufferLen)); - WriteFile(h, buffer, bufferLen, &n, nullptr); + WriteFile(h, buffer, (DWORD)bufferLen, &n, nullptr); CloseHandle(h); link = L" file:///"; -- cgit v1.2.3