diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
commit | 1ce3da1cca093143d9629bc46e221dd8be962e12 (patch) | |
tree | b99d12d635a65f8c78499137137df2bd591b50be /src/modules/addcontact | |
parent | 03512ff2ed0f3d1ed6857ee85b0eb7268931ec3f (diff) |
- MAllStrings: a handy union to hold an incoming string parameter of any type;
- FNAMECHAR: atavism extincted;
- PROTOSEARCHRESULT: structure prepared to use results of any type, including utf
git-svn-id: http://svn.miranda-ng.org/main/trunk@13932 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/addcontact')
-rw-r--r-- | src/modules/addcontact/addcontact.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index d0028ee77f..0c905b1c52 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -52,11 +52,11 @@ public: if (m_acs.psr) {
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)mir_alloc(m_acs.psr->cbSize);
memcpy(psr, m_acs.psr, m_acs.psr->cbSize);
- psr->nick = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->nick) : mir_a2t((char*)psr->nick);
- psr->firstName = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->firstName) : mir_a2t((char*)psr->firstName);
- psr->lastName = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->lastName) : mir_a2t((char*)psr->lastName);
- psr->email = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->email) : mir_a2t((char*)psr->email);
- psr->id = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->id) : mir_a2t((char*)psr->id);
+ psr->nick.t = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->nick.t) : mir_a2t((char*)psr->nick.t);
+ psr->firstName.t = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->firstName.t) : mir_a2t((char*)psr->firstName.t);
+ psr->lastName.t = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->lastName.t) : mir_a2t((char*)psr->lastName.t);
+ psr->email.t = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->email.t) : mir_a2t((char*)psr->email.t);
+ psr->id.t = (psr->flags & PSR_UNICODE) ? mir_u2t((wchar_t*)psr->id.t) : mir_a2t((char*)psr->id.t);
psr->flags = psr->flags & ~PSR_UNICODE | PSR_TCHAR;
m_acs.psr = psr;
}
@@ -98,7 +98,7 @@ public: }
if (!isSet) {
szName = (m_acs.handleType == HANDLE_EVENT) ? (tmpStr = mir_a2t(szUin)) :
- (m_acs.psr->id ? m_acs.psr->id : m_acs.psr->nick);
+ (m_acs.psr->id.t ? m_acs.psr->id.t : m_acs.psr->nick.t);
}
}
@@ -152,10 +152,10 @@ public: Window_FreeIcon_IcoLib(m_hwnd);
if (m_acs.psr) {
- mir_free(m_acs.psr->nick);
- mir_free(m_acs.psr->firstName);
- mir_free(m_acs.psr->lastName);
- mir_free(m_acs.psr->email);
+ mir_free(m_acs.psr->nick.t);
+ mir_free(m_acs.psr->firstName.t);
+ mir_free(m_acs.psr->lastName.t);
+ mir_free(m_acs.psr->email.t);
mir_free(m_acs.psr);
}
}
|