From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- plugins/StatusManager/src/KeepStatus/keepstatus.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/StatusManager/src/KeepStatus/keepstatus.cpp') 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; -- cgit v1.2.3