From 9613f96e6a6f96ad02a0fc926054132811ae2bb1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 3 Apr 2018 16:30:25 +0300 Subject: Accounts() : iterator for accounts --- src/core/stdautoaway/src/autoaway.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/core/stdautoaway') diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index 27531d2b2b..af0a60e441 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -57,12 +57,7 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam) if (mii.aaStatus == 0) return 0; - int numAccounts; - PROTOACCOUNT** accounts; - Proto_EnumAccounts(&numAccounts, &accounts); - - for (int i = 0; i < numAccounts; i++) { - PROTOACCOUNT *pa = accounts[i]; + for (auto &pa : Accounts()) { if (!pa->IsEnabled() || pa->IsLocked()) continue; -- cgit v1.2.3