diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-22 16:04:17 +0000 |
commit | e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch) | |
tree | ba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/WhatsApp/src | |
parent | f8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff) |
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 10 | ||||
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
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());
|