From 4b7131f74cd61043668d3a5805fe452d601181f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 13 Feb 2019 18:26:49 +0300 Subject: CurrencyRates: - own archaic xml processor removed; - Import/Export now uses TinyXml; - massive code cleaning - version bump. --- plugins/CurrencyRates/src/DBUtils.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/CurrencyRates/src/DBUtils.cpp') 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) -- cgit v1.2.3