diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_clisttray.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 49d924a24b..20ae2065a3 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -274,17 +274,12 @@ void SettingsMigrate(void) static int GetGoodAccNum(bool *bDiffers, bool *bConn = nullptr)
{
- PROTOACCOUNT **acc;
- int AccNum;
- Proto_EnumAccounts(&AccNum, &acc);
-
*bDiffers = false;
if (bConn)
*bConn = false;
int iPrevStatus = 0, res = 0;
- while (AccNum--) {
- PROTOACCOUNT *pa = acc[AccNum];
+ for (auto &pa : Accounts()) {
if (!pa->IsVisible())
continue;
@@ -373,15 +368,9 @@ int cliTrayIconInit(HWND hwnd) break;
case TRAY_ICON_MODE_ALL:
- PROTOACCOUNT **acc;
- int AccNum;
- Proto_EnumAccounts(&AccNum, &acc);
-
- for (int i = AccNum; i--;) {
- PROTOACCOUNT *pa = acc[i];
+ for (auto &pa : Accounts().rev_iter())
if (pa->IsVisible() && pa->ppro != nullptr)
pcli->pfnTrayIconAdd(hwnd, pa->szModuleName, nullptr, pa->ppro->m_iStatus);
- }
break;
}
|