From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/chat.cpp | 10 +++++----- protocols/WhatsApp/src/proto.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'protocols/WhatsApp') diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 8f4469af3e..68ccac9a58 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -25,7 +25,7 @@ INT_PTR __cdecl WhatsAppProto::OnCreateGroup(WPARAM wParam, LPARAM lParam) es.szModuleName = m_szModuleName; if (EnterString(&es)) { if (isOnline()) { - std::string groupName(ptrA(mir_utf8encodeT(es.ptszResult))); + std::string groupName(T2Utf(es.ptszResult)); m_pConnection->sendCreateGroupChat(groupName); } mir_free(es.ptszResult); @@ -43,7 +43,7 @@ int WhatsAppProto::onGroupChatEvent(WPARAM wParam, LPARAM lParam) if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0; - std::string chat_id(ptrA(mir_utf8encodeT(gch->pDest->ptszID))); + std::string chat_id(T2Utf(gch->pDest->ptszID)); WAChatInfo *pInfo = SafeGetChat(chat_id); if (pInfo == NULL) return 0; @@ -59,7 +59,7 @@ int WhatsAppProto::onGroupChatEvent(WPARAM wParam, LPARAM lParam) case GC_USER_MESSAGE: if (isOnline()) { - std::string msg(ptrA(mir_utf8encodeT(gch->ptszText))); + std::string msg(T2Utf(gch->ptszText)); try { int msgId = GetSerial(); @@ -156,8 +156,8 @@ void WhatsAppProto::EditChatSubject(WAChatInfo *pInfo) es.caption = title; es.szDataPrefix = "setSubject_"; if (EnterString(&es)) { - ptrA gjid(mir_utf8encodeT(pInfo->tszJid)); - ptrA gsubject(mir_utf8encodeT(es.ptszResult)); + T2Utf gjid(pInfo->tszJid); + T2Utf gsubject(es.ptszResult); m_pConnection->sendSetNewSubject(std::string(gjid), std::string(gsubject)); mir_free(es.ptszResult); } diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 2bf2bd88db..b594ad63fd 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -168,7 +168,7 @@ MCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT* psr) if (psr->id == NULL) return NULL; - std::string phone(ptrA(mir_utf8encodeT(psr->id))); + std::string phone(T2Utf(psr->id)); std::string jid(phone + "@s.whatsapp.net"); MCONTACT hContact = AddToContactList(jid, phone.c_str()); -- cgit v1.2.3