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 --- plugins/SmileyAdd/src/smileys.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 6c061d5fab..d4c4fdf5d0 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -836,10 +836,8 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void) AddProtoAsCategory(pd->szName, defaultFile); } - PROTOACCOUNT **accList; - Proto_EnumAccounts(&protoCount, &accList); - for (int i = 0; i < protoCount; i++) - AddAccountAsCategory(accList[i], defaultFile); + for (auto &pa : Accounts()) + AddAccountAsCategory(pa, defaultFile); for (auto &hContact : Contacts()) AddContactTransportAsCategory(hContact, defaultFile); -- cgit v1.2.3