summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-26 15:19:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-26 15:19:44 +0000
commit324b246fb23cd518bdd1907985c695b8fc4f28d2 (patch)
treeb41cb8a3e91484e1677f11e1a0693075cb8382f5 /protocols/JabberG/src/jabber_chat.cpp
parent65cc377f4b4161dee01c43e0430ff7b236874839 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@6241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 14ccdb56c4..b21c0ddfa7 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -106,7 +106,8 @@ int JabberGcGetStatus(JABBER_GC_AFFILIATION a, JABBER_GC_ROLE r)
switch (r) {
case ROLE_MODERATOR: return 2;
case ROLE_PARTICIPANT: return 1;
- } }
+ }
+ }
return 0;
}
@@ -121,8 +122,8 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item)
int i;
// translate string for menus (this can't be done in initializer)
- for (i = 0; i < SIZEOF(sttAffiliationItems); i++) sttAffiliationItems[i].translate();
- for (i = 0; i < SIZEOF(sttRoleItems); i++) sttRoleItems[i].translate();
+ for (i=0; i < SIZEOF(sttAffiliationItems); i++) sttAffiliationItems[i].translate();
+ for (i=0; i < SIZEOF(sttRoleItems); i++) sttRoleItems[i].translate();
TCHAR *szNick = JabberNickFromJID(item->jid);
@@ -398,7 +399,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
static gc_item *sttFindGcMenuItem(GCMENUITEMS *items, DWORD id)
{
- for (int i = 0; i < items->nItems; i++)
+ for (int i=0; i < items->nItems; i++)
if (items->Item[i].dwID == id)
return items->Item + i;
return NULL;
@@ -406,14 +407,14 @@ static gc_item *sttFindGcMenuItem(GCMENUITEMS *items, DWORD id)
static void sttSetupGcMenuItem(GCMENUITEMS *items, DWORD id, bool disabled)
{
- for (int i = 0; i < items->nItems; i++)
+ for (int i=0; i < items->nItems; i++)
if ( !id || (items->Item[i].dwID == id))
items->Item[i].bDisabled = disabled;
}
static void sttShowGcMenuItem(GCMENUITEMS *items, DWORD id, int type)
{
- for (int i = 0; i < items->nItems; i++)
+ for (int i=0; i < items->nItems; i++)
if ( !id || (items->Item[i].dwID == id))
items->Item[i].uType = type;
}
@@ -611,13 +612,13 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam)
for (; idx <= IDM_LINK9; ++idx)
sttFindGcMenuItem(gcmi, idx)->uType = 0;
- for (i = 0; i < SIZEOF(sttAffiliationItems); i++) {
+ for (i=0; i < SIZEOF(sttAffiliationItems); i++) {
gc_item *item = sttFindGcMenuItem(gcmi, sttAffiliationItems[i].id);
item->uType = (him->m_affiliation == sttAffiliationItems[i].value) ? MENU_POPUPCHECK : MENU_POPUPITEM;
item->bDisabled = !(force || sttAffiliationItems[i].check(me, him));
}
- for (i = 0; i < SIZEOF(sttRoleItems); i++) {
+ for (i=0; i < SIZEOF(sttRoleItems); i++) {
gc_item *item = sttFindGcMenuItem(gcmi, sttRoleItems[i].id);
item->uType = (him->m_role == sttRoleItems[i].value) ? MENU_POPUPCHECK : MENU_POPUPITEM;
item->bDisabled = !(force || sttRoleItems[i].check(me, him));
@@ -742,7 +743,7 @@ public:
~CGroupchatInviteDlg()
{
- for (int i = 0; i < m_newJids.getCount(); i++)
+ for (int i=0; i < m_newJids.getCount(); i++)
mir_free(m_newJids[i]);
mir_free(m_room);
}
@@ -779,7 +780,7 @@ public:
}
int i;
- for (i = 0; i < m_newJids.getCount(); i++)
+ for (i=0; i < m_newJids.getCount(); i++)
if ( !lstrcmp(m_newJids[i]->jid, buf))
break;
if (i != m_newJids.getCount())
@@ -821,7 +822,7 @@ public:
}
// invite others
- for (int i = 0; i < m_newJids.getCount(); i++)
+ for (int i=0; i < m_newJids.getCount(); i++)
if (SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)m_newJids[i]->hItem, 0))
InviteUser(m_newJids[i]->jid, text);
@@ -901,7 +902,7 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
SetDlgItemText(hwndDlg, IDC_TXT_JID, dat->him->m_tszRealJid ? dat->him->m_tszRealJid : TranslateT("Real JID not available"));
SetDlgItemText(hwndDlg, IDC_TXT_STATUS, dat->him->m_tszStatusMessage);
- for (i = 0; i < SIZEOF(sttRoleItems); i++)
+ for (i=0; i < SIZEOF(sttRoleItems); i++)
{
if ((sttRoleItems[i].value == dat->him->m_role) || sttRoleItems[i].check(dat->me, dat->him))
{
@@ -912,7 +913,7 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
SendDlgItemMessage(hwndDlg, IDC_TXT_ROLE, CB_SETCURSEL, idx, 0);
}
}
- for (i = 0; i < SIZEOF(sttAffiliationItems); i++)
+ for (i=0; i < SIZEOF(sttAffiliationItems); i++)
{
if ((sttAffiliationItems[i].value == dat->him->m_affiliation) || sttAffiliationItems[i].check(dat->me, dat->him))
{
@@ -1318,7 +1319,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g
TCHAR *ptszBuf = (TCHAR*)_alloca(sizeof(TCHAR) * cbLen);
if (s) {
TCHAR *d = ptszBuf;
- for (size_t i = 0; i < cbLen && s[i] != 0; i++) {
+ for (size_t i=0; i < cbLen && s[i] != 0; i++) {
if (s[i] != '\n' || (i && s[i-1] == '\r'))
*d++ = s[i];
else {