diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:26 +0300 |
commit | 8ffc77be71507825a8f7585bcabff8ccc370206a (patch) | |
tree | aa13a8070f31286db6ad22e17a577e547942f951 /plugins/ClientChangeNotify/src/CString.cpp | |
parent | 41b2fdfc654e3eec07c97ceba00cda13d988ffff (diff) |
db_get_sa / db_get_wsa to receive the default value, massive code simplification
Diffstat (limited to 'plugins/ClientChangeNotify/src/CString.cpp')
-rw-r--r-- | plugins/ClientChangeNotify/src/CString.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/ClientChangeNotify/src/CString.cpp b/plugins/ClientChangeNotify/src/CString.cpp index b0396d375e..ece8b81645 100644 --- a/plugins/ClientChangeNotify/src/CString.cpp +++ b/plugins/ClientChangeNotify/src/CString.cpp @@ -259,14 +259,12 @@ template class TString<WCHAR>; CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
{
- ptrA p(db_get_sa(hContact, szModule, szSetting));
- return CString(p == NULL ? szDefaultValue : p);
+ return CString(ptrA(db_get_sa(hContact, szModule, szSetting, szDefaultValue)));
}
TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
{
- ptrW p(db_get_wsa(hContact, szModule, szSetting));
- return TCString(p == NULL ? szDefaultValue : p);
+ return TCString(ptrW(db_get_wsa(hContact, szModule, szSetting, szDefaultValue)));
}
TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szDefaultValue)
|