diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-01 04:50:22 +0000 |
commit | 41a7300678e4bb3cd703e2c236e57af4a31962c7 (patch) | |
tree | 36318f807498cf15b405eda5c451fd37bfe1b675 /protocols/JabberG/src/jabber_disco.cpp | |
parent | 97e0ada5c34d6e7eba1cf47a8d8ac029197be6de (diff) |
mir_snprintf(..., sizeof() -> SIZEOF(), ...)
small fixs cleanups
git-svn-id: http://svn.miranda-ng.org/main/trunk@11188 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_disco.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 73e75d5faf..66b60174bc 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -441,14 +441,14 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) int count = getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
ptrT tszName( getTStringA(setting));
if (tszName == NULL)
continue;
- mir_snprintf(setting, sizeof(setting), "discoWnd_favJID_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", i);
ptrT dbvJid( getTStringA(setting));
- mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", i);
ptrT dbvNode( getTStringA(setting));
CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(dbvJid, dbvNode, tszName);
SendBothRequests(pNode, NULL);
@@ -801,7 +801,7 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) int count = m_proto->getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
ptrT tszName( m_proto->getTStringA(setting));
if (tszName != NULL) {
HMENU hSubMenu = CreatePopupMenu();
@@ -835,11 +835,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) if (res % 10) {
res /= 10;
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "discoWnd_favName_%d", res);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", res);
m_proto->delSetting(setting);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favJID_%d", res);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", res);
m_proto->delSetting(setting);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", res);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", res);
m_proto->delSetting(setting);
}
else {
@@ -849,11 +849,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "discoWnd_favJID_%d", res);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", res);
ptrT dbv( m_proto->getTStringA(setting));
if (dbv) SetDlgItemText(m_hwnd, IDC_COMBO_JID, dbv);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", res);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", res);
dbv = m_proto->getTStringA(setting);
if (dbv) SetDlgItemText(m_hwnd, IDC_COMBO_NODE, dbv);
@@ -864,11 +864,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *) int count = m_proto->getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, sizeof(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
m_proto->delSetting(setting);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favJID_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", i);
m_proto->delSetting(setting);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", i);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", i);
m_proto->delSetting(setting);
}
m_proto->delSetting("discoWnd_favCount");
@@ -1342,11 +1342,11 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM {
char setting[MAXMODULELABELLENGTH];
int count = getDword("discoWnd_favCount", 0);
- mir_snprintf(setting, sizeof(setting), "discoWnd_favName_%d", count);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", count);
setTString(setting, pNode->GetName() ? pNode->GetName() : pNode->GetJid());
- mir_snprintf(setting, sizeof(setting), "discoWnd_favJID_%d", count);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", count);
setTString(setting, pNode->GetJid());
- mir_snprintf(setting, sizeof(setting), "discoWnd_favNode_%d", count);
+ mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", count);
setTString(setting, pNode->GetNode() ? pNode->GetNode() : _T(""));
setDword("discoWnd_favCount", ++count);
}
|