summaryrefslogtreecommitdiff
path: root/plugins/Quotes
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /plugins/Quotes
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (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 'plugins/Quotes')
-rw-r--r--plugins/Quotes/src/ImportExport.cpp5
-rw-r--r--plugins/Quotes/src/QuotesProviderBase.cpp2
-rw-r--r--plugins/Quotes/src/XMLEngineMI.cpp8
3 files changed, 4 insertions, 11 deletions
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<TCHAR> ss(xi.toString(m_hXML, NULL));
if (ss.m_p)
- {
- mir_safe_string<char> mss(mir_utf8encodeT(ss.m_p));
- if (mss.m_p)
- {
- o << mss.m_p;
- }
- }
+ o << (char*)T2Utf(ss.m_p);
}
private: