diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-16 18:08:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-16 18:08:37 +0000 |
commit | 253783569bef2320d04fe1d310709c64c64fd3a1 (patch) | |
tree | 55181ccfc8d93cd78aa8ded73bc7ab289e6ec8b9 /protocols/IcqOscarJ/src/icq_db.cpp | |
parent | b3783bb50a312fa59d302aeede929377c18a6ec1 (diff) |
- custom list of time zones removed;
- adaptation of ICQ for new Time API;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8140 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_db.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_db.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp index f605d7605d..8246b7ffa1 100644 --- a/protocols/IcqOscarJ/src/icq_db.cpp +++ b/protocols/IcqOscarJ/src/icq_db.cpp @@ -136,13 +136,13 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns {
if (szStatusMsg && szStatusMsg[0]) {
if (isAnsi) {
- char* szStatusNote = getSettingStringUtf(hContact, DBSETTING_STATUS_NOTE, "");
- wchar_t* szStatusNoteW = make_unicode_string(szStatusNote);
+ char *szStatusNote = getSettingStringUtf(hContact, DBSETTING_STATUS_NOTE, "");
+ wchar_t *szStatusNoteW = make_unicode_string(szStatusNote);
int len = (int)wcslen(szStatusNoteW) * 3 + 1;
- char* szStatusNoteAnsi = (char*)alloca(len);
+ char *szStatusNoteAnsi = (char*)alloca(len);
WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, szStatusNoteW, -1, szStatusNoteAnsi, len, NULL, NULL);
bool notmatch = false;
- for (int i=0; ;++i) {
+ for (int i = 0;; ++i) {
if (szStatusNoteAnsi[i] != szStatusMsg[i] && szStatusNoteAnsi[i] != '?' && szStatusMsg[i] != '?') {
notmatch = true;
break;
@@ -156,7 +156,7 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns SAFE_FREE(&szStatusNote);
}
- char* oldStatusMsg = NULL;
+ char *oldStatusMsg = NULL;
DBVARIANT dbv;
if ( !db_get_ts(hContact, "CList", "StatusMsg", &dbv)) {
oldStatusMsg = make_utf8_string(dbv.ptszVal);
@@ -203,8 +203,7 @@ MCONTACT CIcqProto::FindFirstContact() MCONTACT CIcqProto::FindNextContact(MCONTACT hContact)
{
hContact = db_find_next(hContact, m_szModuleName);
- while (hContact != NULL)
- {
+ while (hContact != NULL) {
if (IsICQContact(hContact))
return hContact;
hContact = db_find_next(hContact, m_szModuleName);
|