summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 22:31:27 +0300
commit391980ce1e890445542441eeb5d9f9cc18ae1baf (patch)
treeee1b165175dcdaeeaabd2ddb822542e648663a90 /protocols/IcqOscarJ
parentbf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff)
code optimization
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/src/capabilities.cpp6
-rw-r--r--protocols/IcqOscarJ/src/dlgproc.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/protocols/IcqOscarJ/src/capabilities.cpp b/protocols/IcqOscarJ/src/capabilities.cpp
index 9bc780ea4d..4a35b19ea6 100644
--- a/protocols/IcqOscarJ/src/capabilities.cpp
+++ b/protocols/IcqOscarJ/src/capabilities.cpp
@@ -84,12 +84,12 @@ void NetLog_CapabilityChange(CIcqProto *ppro, const char *szChange, DWORD fdwCap
if (!fdwCapabilities) return;
- for (int nIndex = 0; nIndex < _countof(CapabilityNames); nIndex++) {
+ for (auto &it : CapabilityNames) {
// Check if the current capability is present
- if ((fdwCapabilities & CapabilityNames[nIndex].capID) == CapabilityNames[nIndex].capID) {
+ if ((fdwCapabilities & it.capID) == it.capID) {
if (mir_strlen(szBuffer))
mir_strcat(szBuffer, ", ");
- mir_strcat(szBuffer, CapabilityNames[nIndex].capName);
+ mir_strcat(szBuffer, it.capName);
}
}
// Log the change
diff --git a/protocols/IcqOscarJ/src/dlgproc.cpp b/protocols/IcqOscarJ/src/dlgproc.cpp
index d0ddd84eec..b754a2e5ab 100644
--- a/protocols/IcqOscarJ/src/dlgproc.cpp
+++ b/protocols/IcqOscarJ/src/dlgproc.cpp
@@ -458,7 +458,8 @@ INT_PTR CALLBACK ChangeInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (ack->type != ACKTYPE_SETINFO) break;
if (ack->result == ACKRESULT_SUCCESS) {
for (i = 0; i < _countof(dat->hUpload); i++)
- if (dat->hUpload[i] && ack->hProcess == dat->hUpload[i]) break;
+ if (dat->hUpload[i] && ack->hProcess == dat->hUpload[i])
+ break;
if (i == _countof(dat->hUpload)) break;
dat->hUpload[i] = nullptr;