diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-03 16:30:25 +0300 |
commit | 9613f96e6a6f96ad02a0fc926054132811ae2bb1 (patch) | |
tree | f8fe94a3efe7598a2af926f264d354f7a08fb943 /plugins/StatusManager/src/main.cpp | |
parent | 2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff) |
Accounts() : iterator for accounts
Diffstat (limited to 'plugins/StatusManager/src/main.cpp')
-rw-r--r-- | plugins/StatusManager/src/main.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp index 5d5db295e3..5996a200c6 100644 --- a/plugins/StatusManager/src/main.cpp +++ b/plugins/StatusManager/src/main.cpp @@ -83,13 +83,9 @@ int OnModulesLoaded(WPARAM, LPARAM) //////////////////////////////////////////////////////////////////////////////////////// - int count; - PROTOACCOUNT** protos; - Proto_EnumAccounts(&count, &protos); - - for (int i = 0; i < count; i++) - if (IsSuitableProto(protos[i])) - protoList.insert(new SMProto(protos[i])); + for (auto &pa : Accounts()) + if (IsSuitableProto(pa)) + protoList.insert(new SMProto(pa)); return 0; } |