diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-26 09:20:25 +0000 |
commit | 6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch) | |
tree | 2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/Boltun/src/config.cpp | |
parent | a61c8728b379057fe7f0a0d86fe0b037598229dd (diff) |
less TCHARs:
- TCHAR is replaced with wchar_t everywhere;
- LPGENT replaced with either LPGENW or LPGEN;
- fixes for ANSI plugins that improperly used _t functions;
- TCHAR *t removed from MAllStrings;
- ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz*
git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Boltun/src/config.cpp')
-rw-r--r-- | plugins/Boltun/src/config.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Boltun/src/config.cpp b/plugins/Boltun/src/config.cpp index 27aefdf329..dd821a886b 100644 --- a/plugins/Boltun/src/config.cpp +++ b/plugins/Boltun/src/config.cpp @@ -36,31 +36,31 @@ #define DB_ENGINE_LOWERCASE "MakeLowerCase"
#define DB_ENGINE_UNDERSTAND_ALWAYS "UnderstandAlways"
-inline TCHAR* GetString(char* key, const TCHAR* def)
+inline wchar_t* GetString(char* key, const wchar_t* def)
{
DBVARIANT dbv;
- TCHAR* val;
+ wchar_t* val;
if (!db_get_ts(NULL, BOLTUN_KEY, key, &dbv))
{
size_t len = mir_wstrlen(dbv.ptszVal) + 1;
- val = new TCHAR[len];
- _tcscpy_s(val, len, dbv.ptszVal);
+ val = new wchar_t[len];
+ wcscpy_s(val, len, dbv.ptszVal);
db_free(&dbv);
}
else
{
size_t len = mir_wstrlen(def) + 1;
- val = new TCHAR[len];
- _tcscpy_s(val, len, def);
+ val = new wchar_t[len];
+ wcscpy_s(val, len, def);
}
return val;
}
-inline const TCHAR* SetString(char* key, const TCHAR* value)
+inline const wchar_t* SetString(char* key, const wchar_t* value)
{
size_t len = mir_tstrlen(value) + 1;
- TCHAR* val = new TCHAR[len];
- _tcscpy_s(val, len, value);
+ wchar_t* val = new wchar_t[len];
+ wcscpy_s(val, len, value);
db_set_ts(NULL, BOLTUN_KEY, key, val);
return val;
}
@@ -80,9 +80,9 @@ inline const TCHAR* SetString(char* key, const TCHAR* value) return value; }
#define BUILDSTRETTERS(x, str, def) \
- const TCHAR* BoltunConfig::Get##x() { \
+ const wchar_t* BoltunConfig::Get##x() { \
return GetString(str, def); } \
- const TCHAR* BoltunConfig::Set##x(const TCHAR* value) { \
+ const wchar_t* BoltunConfig::Set##x(const wchar_t* value) { \
return SetString(str, value); }
#define BUILDINIT(x) \
|