diff options
Diffstat (limited to 'plugins/AutoShutdown/src/settingsdlg.cpp')
-rw-r--r-- | plugins/AutoShutdown/src/settingsdlg.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 662196b3ca..f16108840d 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -51,13 +51,10 @@ static BOOL CALLBACK DisplayCpuUsageProc(BYTE nCpuUsage, LPARAM lParam) static bool AnyProtoHasCaps(DWORD caps1)
{
- int nProtoCount;
- PROTOACCOUNT **protos;
- Proto_EnumAccounts(&nProtoCount, &protos);
-
- for (int i = 0; i < nProtoCount; ++i)
- if (CallProtoService(protos[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&caps1)
+ for (auto &pa : Accounts())
+ if (CallProtoService(pa->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & caps1)
return true; /* CALLSERVICE_NOTFOUND also handled gracefully */
+
return false;
}
|