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_*) --- protocols/SkypeWeb/src/main.cpp | 2 -- protocols/SkypeWeb/src/skype_trouter.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/SkypeWeb') diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 394126f175..1f280d8763 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -19,7 +19,6 @@ along with this program. If not, see . CMPlugin g_plugin; CHAT_MANAGER *pci; -CLIST_INTERFACE *pcli; char g_szMirVer[100]; HANDLE g_hCallEvent; @@ -63,7 +62,6 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); pci = Chat_GetInterface(); Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer)); diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 65e4108808..0b39aeea58 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -201,7 +201,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &) CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), Clist_GetContactDisplayName(hContact)); cle.szTooltip.w = tooltip.GetBuffer(); - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); ShowNotification(Clist_GetContactDisplayName(hContact), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL); } @@ -224,9 +224,9 @@ INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM, LPARAM lParam) INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact) { - while (CLISTEVENT *cle = pcli->pfnGetEvent(hContact, 0)) { + while (CLISTEVENT *cle = g_CLI.pfnGetEvent(hContact, 0)) { if (cle->lParam == SKYPE_DB_EVENT_TYPE_INCOMING_CALL) { - pcli->pfnRemoveEvent(hContact, cle->hDbEvent); + g_CLI.pfnRemoveEvent(hContact, cle->hDbEvent); break; } } -- cgit v1.2.3