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/FacebookRM/src/process.cpp | |
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/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index af61679db4..e89049cd70 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -27,7 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /** * Helper function for loading name from database (or use default one specified as parameter), used for title of few notifications. */ -std::string getContactName(FacebookProto *proto, MCONTACT hContact, const char *defaultName) { +std::string getContactName(FacebookProto *proto, MCONTACT hContact, const char *defaultName) +{ std::string name = defaultName; DBVARIANT dbv; @@ -1225,8 +1226,7 @@ void FacebookProto::SearchAckThread(void *targ) int count = 0; - char *arg = mir_utf8encodeT((TCHAR*)targ); - std::string search = utils::url::encode(arg); + std::string search = utils::url::encode(T2Utf((TCHAR *)targ).str()); std::string ssid; while (count < 50 && !isOffline()) @@ -1300,15 +1300,13 @@ void FacebookProto::SearchAckThread(void *targ) facy.handle_success("searchAckThread"); mir_free(targ); - mir_free(arg); } void FacebookProto::SearchIdAckThread(void *targ) { facy.handle_entry("searchIdAckThread"); - char *arg = mir_utf8encodeT((TCHAR*)targ); - std::string search = utils::url::encode(arg) + "?"; + std::string search = utils::url::encode(T2Utf((TCHAR*)targ).str()) + "?"; if (!isOffline()) { @@ -1358,5 +1356,4 @@ void FacebookProto::SearchIdAckThread(void *targ) facy.handle_success("searchIdAckThread"); mir_free(targ); - mir_free(arg); } |