From 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 May 2018 23:29:25 +0300 Subject: no need to initialize pcli variable in each plugin (only in Clist_*) --- src/core/stdfile/src/file.cpp | 6 +++--- src/core/stdfile/src/main.cpp | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/core/stdfile') diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 9ce90ca28a..fa85763130 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -114,7 +114,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) cle.flags |= CLEF_UNICODE; cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE); cle.pszService = "SRFile/RecvFile"; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } @@ -306,9 +306,9 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam) ACKDATA *ack = (ACKDATA*)lParam; if (ack->type == ACKTYPE_FILE) { int iEvent = 0; - while (CLISTEVENT *cle = pcli->pfnGetEvent(ack->hContact, iEvent++)) + while (CLISTEVENT *cle = g_CLI.pfnGetEvent(ack->hContact, iEvent++)) if (cle->lParam == (LPARAM)ack->hProcess) - pcli->pfnRemoveEvent(ack->hContact, cle->hDbEvent); + g_CLI.pfnRemoveEvent(ack->hContact, cle->hDbEvent); } return 0; } diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp index 27a00db40a..b4b4146518 100644 --- a/src/core/stdfile/src/main.cpp +++ b/src/core/stdfile/src/main.cpp @@ -25,8 +25,6 @@ int LoadSendRecvFileModule(void); CMPlugin g_plugin; -CLIST_INTERFACE* pcli; - ITaskbarList3 * pTaskbarInterface; ///////////////////////////////////////////////////////////////////////////////////////// @@ -56,8 +54,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - if ( IsWinVer7Plus()) CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, IID_ITaskbarList3, (void**)&pTaskbarInterface); -- cgit v1.2.3