diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-13 18:26:49 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-13 18:26:49 +0300 |
commit | 4b7131f74cd61043668d3a5805fe452d601181f1 (patch) | |
tree | c90fd20de073ab0f69c348159e005cdfe06a7b21 /plugins/CurrencyRates/src/DBUtils.cpp | |
parent | fc9267f9677b1f40ea40d56e54aae9d655ea1a03 (diff) |
CurrencyRates:
- own archaic xml processor removed;
- Import/Export now uses TinyXml;
- massive code cleaning
- version bump.
Diffstat (limited to 'plugins/CurrencyRates/src/DBUtils.cpp')
-rw-r--r-- | plugins/CurrencyRates/src/DBUtils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/CurrencyRates/src/DBUtils.cpp b/plugins/CurrencyRates/src/DBUtils.cpp index 0645387d9e..53e1f211b3 100644 --- a/plugins/CurrencyRates/src/DBUtils.cpp +++ b/plugins/CurrencyRates/src/DBUtils.cpp @@ -1,11 +1,12 @@ #include "StdAfx.h" -std::string CurrencyRates_DBGetStringA(MCONTACT hContact, const char* szModule, const char* szSetting, const char* pszDefValue) +std::wstring GetNodeText(const TiXmlElement *pNode) { - if (pszDefValue == nullptr) - pszDefValue = ""; + auto *pszText = pNode->GetText(); + if (pszText) + return Utf2T(pszText); - return std::string(ptrA(db_get_sa(hContact, szModule, szSetting, pszDefValue))); + return std::wstring(); } std::wstring CurrencyRates_DBGetStringW(MCONTACT hContact, const char* szModule, const char* szSetting, const wchar_t* pszDefValue) |