summaryrefslogtreecommitdiff
path: root/src/core/stdautoaway
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-03 16:30:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-03 16:30:25 +0300
commit9613f96e6a6f96ad02a0fc926054132811ae2bb1 (patch)
treef8fe94a3efe7598a2af926f264d354f7a08fb943 /src/core/stdautoaway
parent2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff)
Accounts() : iterator for accounts
Diffstat (limited to 'src/core/stdautoaway')
-rw-r--r--src/core/stdautoaway/src/autoaway.cpp7
1 files changed, 1 insertions, 6 deletions
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;