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 --- plugins/Quotes/src/ImportExport.cpp | 5 ++--- plugins/Quotes/src/QuotesProviderBase.cpp | 2 +- plugins/Quotes/src/XMLEngineMI.cpp | 8 +------- 3 files changed, 4 insertions(+), 11 deletions(-) (limited to 'plugins/Quotes/src') diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index af8faee952..b3dc6e2a9d 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -401,12 +401,11 @@ namespace } else if (0 == quotes_stricmp(g_pszXmlTypeUtf8, sType.c_str())) { - dbs.value.pszVal = mir_utf8encodeT(sValue.c_str()); + T2Utf szValue(sValue.c_str()); + dbs.value.pszVal = szValue; dbs.value.type = DBVT_UTF8; if (set_contact_settings(hContact, dbs)) ++cCreatedRecords; - - mir_free(dbs.value.pszVal); } else if (0 == quotes_stricmp(g_pszXmlTypeWchar, sType.c_str())) { diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp index e080025278..74dbfc01f0 100644 --- a/plugins/Quotes/src/QuotesProviderBase.cpp +++ b/plugins/Quotes/src/QuotesProviderBase.cpp @@ -566,7 +566,7 @@ namespace const tstring& rsFormat) { tstring s = format_rate(pProvider, hContact, rsFormat); - ptrA psz(mir_utf8encodeT(s.c_str())); + T2Utf psz(s.c_str()); DBEVENTINFO dbei = { sizeof(dbei) }; dbei.szModule = QUOTES_PROTOCOL_NAME; diff --git a/plugins/Quotes/src/XMLEngineMI.cpp b/plugins/Quotes/src/XMLEngineMI.cpp index 7e9e3f6016..871cc2ed4f 100644 --- a/plugins/Quotes/src/XMLEngineMI.cpp +++ b/plugins/Quotes/src/XMLEngineMI.cpp @@ -114,13 +114,7 @@ namespace safe_string ss(xi.toString(m_hXML, NULL)); if (ss.m_p) - { - mir_safe_string mss(mir_utf8encodeT(ss.m_p)); - if (mss.m_p) - { - o << mss.m_p; - } - } + o << (char*)T2Utf(ss.m_p); } private: -- cgit v1.2.3