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 /plugins/StatusManager | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'plugins/StatusManager')
3 files changed, 15 insertions, 15 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp index 41e09bc0bf..50cf03813d 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp @@ -599,9 +599,9 @@ void AdvancedAutoAwayUnload() KillModuleOptions(AAALangPack); - for (int i = 0; i < _countof(hEvents); i++) { - UnhookEvent(hEvents[i]); - hEvents[i] = nullptr; + for (auto &it : hEvents) { + UnhookEvent(it); + it = nullptr; } DestroyHookableEvent(hStateChangedEvent); hStateChangedEvent = nullptr; diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp index 7ac0eb0dd2..5c925893f9 100644 --- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp +++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp @@ -1205,14 +1205,14 @@ void KeepStatusUnload() KillModuleOptions(KSLangPack); - for (int i = 0; i < _countof(hServices); i++) { - DestroyServiceFunction(hServices[i]); - hServices[i] = nullptr; + for (auto &it : hServices) { + DestroyServiceFunction(it); + it = nullptr; } - for (int i = 0; i < _countof(hEvents); i++) { - UnhookEvent(hEvents[i]); - hEvents[i] = nullptr; + for (auto &it : hEvents) { + UnhookEvent(it); + it = nullptr; } DestroyHookableEvent(hConnectionEvent); hConnectionEvent = nullptr; diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp index 1f051800e6..6559fa6811 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp @@ -519,14 +519,14 @@ void StartupStatusUnload() KillModuleOptions(SSLangPack); - for (int i = 0; i < _countof(hServices); i++) { - DestroyServiceFunction(hServices[i]); - hServices[i] = nullptr; + for (auto &it : hServices) { + DestroyServiceFunction(it); + it = nullptr; } - for (int i = 0; i < _countof(hEvents); i++) { - UnhookEvent(hEvents[i]); - hEvents[i] = nullptr; + for (auto &it : hEvents) { + UnhookEvent(it); + it = nullptr; } DeinitProfilesModule(); |