diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:27 +0300 |
commit | 391980ce1e890445542441eeb5d9f9cc18ae1baf (patch) | |
tree | ee1b165175dcdaeeaabd2ddb822542e648663a90 /src/core/stdmsg | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/msglog.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 1ec5bbbd1c..58d6ecf2a7 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -500,6 +500,6 @@ void LoadMsgLogIcons(void) void FreeMsgLogIcons(void)
{
- for (int i = 0; i < _countof(pLogIconBmpBits); i++)
- mir_free(pLogIconBmpBits[i]);
+ for (auto &it : pLogIconBmpBits)
+ mir_free(it);
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 79cae04ddc..34bb77028c 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -166,11 +166,11 @@ class COptionMainDlg : public CPluginDlgBase tvis.hParent = nullptr;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE;
- for (int i = 0; i < _countof(statusValues); i++) {
- tvis.item.lParam = statusValues[i].style;
- tvis.item.pszText = TranslateW(statusValues[i].szDescr);
+ for (auto &it : statusValues) {
+ tvis.item.lParam = it.style;
+ tvis.item.pszText = TranslateW(it.szDescr);
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.iImage = (style & statusValues[i].style) != 0;
+ tvis.item.iImage = (style & it.style) != 0;
tree.InsertItem(&tvis);
}
}
|