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/FavContacts/src/contact_cache.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/FavContacts/src/contact_cache.cpp')
-rw-r--r-- | plugins/FavContacts/src/contact_cache.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index 38cd4abb62..fb837cdd09 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -114,7 +114,7 @@ float CContactCache::getWeight(int rate) return -1;
}
-static bool AppendInfo(TCHAR *buf, int size, MCONTACT hContact, int info)
+static bool AppendInfo(wchar_t *buf, int size, MCONTACT hContact, int info)
{
ptrT str(Contact_GetInfo(info, hContact));
if (str != NULL) {
@@ -128,7 +128,7 @@ static bool AppendInfo(TCHAR *buf, int size, MCONTACT hContact, int info) void CContactCache::TContactInfo::LoadInfo()
{
if (infoLoaded) return;
- TCHAR *p = info;
+ wchar_t *p = info;
p[0] = p[1] = 0;
@@ -147,22 +147,22 @@ void CContactCache::TContactInfo::LoadInfo() infoLoaded = true;
}
-TCHAR *nb_stristr(TCHAR *str, TCHAR *substr)
+wchar_t *nb_stristr(wchar_t *str, wchar_t *substr)
{
if (!substr || !*substr) return str;
if (!str || !*str) return NULL;
- TCHAR *str_up = NEWTSTR_ALLOCA(str);
- TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
+ wchar_t *str_up = NEWWSTR_ALLOCA(str);
+ wchar_t *substr_up = NEWWSTR_ALLOCA(substr);
CharUpperBuff(str_up, (DWORD)mir_tstrlen(str_up));
CharUpperBuff(substr_up, (DWORD)mir_tstrlen(substr_up));
- TCHAR *p = _tcsstr(str_up, substr_up);
+ wchar_t *p = wcsstr(str_up, substr_up);
return p ? (str + (p - str_up)) : NULL;
}
-bool CContactCache::filter(int rate, TCHAR *str)
+bool CContactCache::filter(int rate, wchar_t *str)
{
if (!str || !*str)
return true;
@@ -172,7 +172,7 @@ bool CContactCache::filter(int rate, TCHAR *str) HKL kbdLayouts[10];
int nKbdLayouts = GetKeyboardLayoutList(_countof(kbdLayouts), kbdLayouts);
- TCHAR buf[256];
+ wchar_t buf[256];
BYTE keyState[256] = { 0 };
for (int iLayout = 0; iLayout < nKbdLayouts; ++iLayout) {
@@ -188,7 +188,7 @@ bool CContactCache::filter(int rate, TCHAR *str) buf[i] = 0;
}
- for (TCHAR *p = m_cache[rate]->info; p && *p; p = p + mir_tstrlen(p) + 1)
+ for (wchar_t *p = m_cache[rate]->info; p && *p; p = p + mir_tstrlen(p) + 1)
if (nb_stristr(p, buf))
return true;
}
|