diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-08 17:08:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-08 17:08:57 +0000 |
commit | 042d05df11513eb57c0f92c95113f65c73755833 (patch) | |
tree | f3b3053806f489da29ba015f3fd5642479a04e1f /plugins/Clist_nicer/src/clcitems.cpp | |
parent | 07d60a35c1e1f2ca033589977fcffa61bf9c8b85 (diff) |
tray menu code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@11276 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clcitems.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clcitems.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index fba78d7009..61ebe3587d 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -247,7 +247,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) db_free( &dbv );
result = cfg::getTString(hContact, szProto, "XStatusName", &dbv);
if ( !result && mir_tstrlen(dbv.ptszVal) > 1) {
- int iLen = mir_tstrlen(dbv.ptszVal);
+ size_t iLen = mir_tstrlen(dbv.ptszVal);
p->bStatusMsgValid = STATUSMSG_XSTATUSNAME;
p->statusMsg = (TCHAR *)realloc(p->statusMsg, (iLen + 2) * sizeof(TCHAR));
_tcsncpy(p->statusMsg, dbv.ptszVal, iLen + 1);
@@ -291,7 +291,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) if (p->bStatusMsgValid != STATUSMSG_NOTFOUND) {
WORD infoTypeC2[12];
memset(infoTypeC2, 0, sizeof(infoTypeC2));
- int iLen = min(mir_wstrlen(p->statusMsg), 10);
+ int iLen = min((int)mir_wstrlen(p->statusMsg), 10);
GetStringTypeW(CT_CTYPE2, p->statusMsg, iLen, infoTypeC2);
p->dwCFlags &= ~ECF_RTLSTATUSMSG;
for (int i = 0; i < 10; i++) {
@@ -345,9 +345,7 @@ void ReloadExtraInfo(MCONTACT hContact) void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
{
WORD infoTypeC2[12];
- int i;
- TCHAR *szText = NULL;
- DWORD iLen;
+ TCHAR *szText;
TExtraCache *p;
memset(infoTypeC2, 0, sizeof(infoTypeC2));
@@ -361,10 +359,10 @@ void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact) p = contact->pExtra;
}
if (p) {
- iLen = min(mir_wstrlen(szText), 10);
+ int iLen = min((int)mir_wstrlen(szText), 10);
GetStringTypeW(CT_CTYPE2, szText, iLen, infoTypeC2);
p->dwCFlags &= ~ECF_RTLNICK;
- for (i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; i++) {
if (infoTypeC2[i] == C2_RIGHTTOLEFT) {
p->dwCFlags |= ECF_RTLNICK;
return;
@@ -376,15 +374,13 @@ void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact) void RTL_DetectGroupName(ClcContact *group)
{
WORD infoTypeC2[12];
- int i;
- DWORD iLen;
group->isRtl = 0;
if (group->szText) {
- iLen = min(mir_wstrlen(group->szText), 10);
+ int iLen = min((int)mir_wstrlen(group->szText), 10);
GetStringTypeW(CT_CTYPE2, group->szText, iLen, infoTypeC2);
- for (i = 0; i < 10; i++) {
+ for (int i = 0; i < 10; i++) {
if (infoTypeC2[i] == C2_RIGHTTOLEFT) {
group->isRtl = 1;
return;
|