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/AdvancedAutoAway/advancedautoaway.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/StatusManager/src/AdvancedAutoAway') 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; -- cgit v1.2.3