From c0ff932b9b6ba685160204fee0af84930f7aa922 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 11 Apr 2025 13:40:09 +0300 Subject: =?UTF-8?q?fixes=20#4975=20(CloudFile:=20=D0=BD=D1=83=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=20=D1=83=D0=B1=D0=B8=D1=80=D0=B0=D1=82=D1=8C=20=D1=83?= =?UTF-8?q?=D1=87=D1=91=D1=82=D0=BA=D1=83=20=D0=B8=D0=B7=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B4=D0=BC=D0=B5=D0=BD=D1=8E=20=D0=B2=20=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=8E=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=B5=D1=91=20=D0=BE=D1=82=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B8)=20+=20some=20code=20clean?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/CloudFile/src/services.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'protocols/CloudFile/src/services.cpp') diff --git a/protocols/CloudFile/src/services.cpp b/protocols/CloudFile/src/services.cpp index f568f2f68c..386fdd26cc 100644 --- a/protocols/CloudFile/src/services.cpp +++ b/protocols/CloudFile/src/services.cpp @@ -2,15 +2,15 @@ static int CompareServices(const CCloudService *p1, const CCloudService *p2) { - return mir_strcmp(p1->GetAccountName(), p2->GetAccountName()); + return mir_strcmp(p1->m_szModuleName, p2->m_szModuleName); } -LIST Services(10, CompareServices); +LIST g_arServices(10, CompareServices); CCloudService* FindService(const char *szProto) { - for (auto &it : Services) - if (!mir_strcmp(it->GetAccountName(), szProto)) + for (auto &it : g_arServices) + if (!mir_strcmp(it->m_szModuleName, szProto)) return it; return nullptr; @@ -32,9 +32,8 @@ static INT_PTR GetService(WPARAM wParam, LPARAM lParam) if (service == nullptr) return 3; - info->accountName = service->GetAccountName(); - info->userName = service->GetUserName(); - + info->accountName = service->m_szModuleName; + info->userName = service->m_tszUserName; return 0; } @@ -44,9 +43,9 @@ static INT_PTR EnumServices(WPARAM wParam, LPARAM lParam) enumCFServiceFunc enumFunc = (enumCFServiceFunc)wParam; void *param = (void*)lParam; - for (auto &service : Services) { - info.accountName = service->GetAccountName(); - info.userName = service->GetUserName(); + for (auto &service : g_arServices) { + info.accountName = service->m_szModuleName; + info.userName = service->m_tszUserName; int res = enumFunc(&info, param); if (res != 0) return res; -- cgit v1.2.3