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/Nudge/src/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/Nudge/src/main.cpp') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index fc2b9b6fd1..2246e107cf 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -207,11 +207,8 @@ void LoadProtocols(void) GlobalNudge.Load(); - int numberOfProtocols = 0; - PROTOACCOUNT **ppProtocolDescriptors; - Proto_EnumAccounts(&numberOfProtocols, &ppProtocolDescriptors); - for (int i = 0; i < numberOfProtocols; i++) - Nudge_AddAccount(ppProtocolDescriptors[i]); + for (auto &pa : Accounts()) + Nudge_AddAccount(pa); shake.Load(); } -- cgit v1.2.3