diff options
Diffstat (limited to 'plugins/CloudFile/src/srmm.cpp')
-rw-r--r-- | plugins/CloudFile/src/srmm.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/CloudFile/src/srmm.cpp b/plugins/CloudFile/src/srmm.cpp index 68c2cca0cb..8e400bbdbf 100644 --- a/plugins/CloudFile/src/srmm.cpp +++ b/plugins/CloudFile/src/srmm.cpp @@ -54,10 +54,8 @@ int OnSrmmButtonPressed(WPARAM, LPARAM lParam) } HMENU hMenu = CreatePopupMenu(); - for (int i = 0; i < Services.getCount(); i++) { - CCloudService *service = Services[i]; - AppendMenu(hMenu, MF_STRING, i + 1, TranslateW(service->GetUserName())); - } + for (auto &it : Services) + AppendMenu(hMenu, MF_STRING, Services.indexOf(&it) + 1, TranslateW(it->GetUserName())); int pos = TrackPopupMenu(hMenu, TPM_RETURNCMD, cbc->pt.x, cbc->pt.y, 0, cbc->hwndFrom, nullptr); DestroyMenu(hMenu); |