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/AVS/src/main.cpp | |
parent | 2f880bda3aa2d8817ce43481df9d99b12ed82a58 (diff) |
Accounts() : iterator for accounts
Diffstat (limited to 'plugins/AVS/src/main.cpp')
-rw-r--r-- | plugins/AVS/src/main.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 2f3577df98..e98e60b23a 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -324,10 +324,6 @@ static int ModulesLoaded(WPARAM, LPARAM) g_AvatarHistoryAvail = ServiceExists(MS_AVATARHISTORY_ENABLED);
- int accCount;
- PROTOACCOUNT **accs = nullptr;
- Proto_EnumAccounts(&accCount, &accs);
-
LoadDefaultInfo();
int protoCount;
@@ -335,8 +331,9 @@ static int ModulesLoaded(WPARAM, LPARAM) Proto_EnumProtocols(&protoCount, &proto);
for (int i = 0; i < protoCount; i++)
LoadProtoInfo(proto[i]);
- for (int i = 0; i < accCount; i++)
- LoadAccountInfo(accs[i]);
+
+ for (auto &it : Accounts())
+ LoadAccountInfo(it);
// Load global avatar
protoPicCacheEntry *pce = new protoPicCacheEntry(PCE_TYPE_GLOBAL);
|