summaryrefslogtreecommitdiff
path: root/plugins/CurrencyRates/src/DBUtils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-13 18:26:49 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-13 18:26:49 +0300
commit4b7131f74cd61043668d3a5805fe452d601181f1 (patch)
treec90fd20de073ab0f69c348159e005cdfe06a7b21 /plugins/CurrencyRates/src/DBUtils.cpp
parentfc9267f9677b1f40ea40d56e54aae9d655ea1a03 (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.cpp9
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)