From 6c38539e9b3d5a72280950310253759085e96f01 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Jan 2016 13:20:34 +0000 Subject: unused functions removed git-svn-id: http://svn.miranda-ng.org/main/trunk@16179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_clistint.inc | 3 --- include/m_clistint.h | 3 --- plugins/Clist_modern/src/init.cpp | 1 - plugins/Clist_modern/src/modern_clistevents.cpp | 6 ----- plugins/Clist_modern/src/modern_commonprototypes.h | 1 - plugins/Clist_nicer/src/clistevents.cpp | 9 ------- plugins/Clist_nicer/src/init.cpp | 2 -- protocols/MSN/src/stdafx.h | 2 +- src/mir_app/src/clc.h | 11 ++++----- src/mir_app/src/clistcore.cpp | 2 -- src/mir_app/src/clistevents.cpp | 28 ++++++++++------------ 11 files changed, 17 insertions(+), 51 deletions(-) diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index d5537c8b24..5b92b8f8ad 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -454,9 +454,6 @@ type events : TEventList; - pfnCreateEvent : function :PCListEvent; cdecl; - pfnFreeEvent : procedure (_para1:PCListEvent); cdecl; - pfnAddEvent : function (_para1:PCLISTEVENT):PCListEvent; cdecl; pfnGetEvent : function (hContact:TMCONTACT; idx:int):PCLISTEVENT; cdecl; diff --git a/include/m_clistint.h b/include/m_clistint.h index 8efc5bc886..04109666ba 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -412,9 +412,6 @@ struct CLIST_INTERFACE EventList events; - struct CListEvent* (*pfnCreateEvent)(void); - void (*pfnFreeEvent)(struct CListEvent*); - struct CListEvent* (*pfnAddEvent)(CLISTEVENT*); CLISTEVENT* (*pfnGetEvent)(MCONTACT hContact, int idx); diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index e1b72f12d1..1cf1580f90 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -171,7 +171,6 @@ static HRESULT SubclassClistInterface() pcli->pfnGetRowByIndex = cliGetRowByIndex; pcli->pfnGetRowsPriorTo = cliGetRowsPriorTo; pcli->pfnGetGroupContentsCount = cliGetGroupContentsCount; - pcli->pfnCreateEvent = cliCreateEvent; pcli->pfnFindRowByText = cliFindRowByText; //partialy overloaded - call default handlers from inside diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 6ea11cdc73..d5b92c3624 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -83,12 +83,6 @@ static CLISTEVENT* MyGetEvent(int iSelection) } -CListEvent* cliCreateEvent(void) -{ - CListEvent *p = (CListEvent *)mir_calloc(sizeof(CListEvent)); - return p; -} - CListEvent* cli_AddEvent(CLISTEVENT *cle) { CListEvent* p = corecli.pfnAddEvent(cle); diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index 4e7833944c..150d69d9a2 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -270,7 +270,6 @@ TCHAR* cli_GetGroupCountsText(ClcData *dat, ClcContact *contact); void cli_ChangeContactIcon(MCONTACT hContact, int iIcon, int add); void cli_SetContactCheckboxes(ClcContact*, int); LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); -CListEvent* cliCreateEvent(void); CListEvent* cli_AddEvent(CLISTEVENT *cle); LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); int cliShowHide(WPARAM wParam, LPARAM lParam); diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index 5e87211e03..751964edb2 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -45,15 +45,6 @@ extern HIMAGELIST hCListImages; HANDLE hNotifyFrame = (HANDLE)-1; -CListEvent* fnCreateEvent(void) -{ - CListEvent *p = reinterpret_cast(mir_alloc(sizeof(CListEvent))); - if (p) - memset(p, 0, sizeof(CListEvent)); - - return p; -} - void HideShowNotifyFrame() { int dwVisible = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, hNotifyFrame), 0) & F_VISIBLE; diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 452676eefb..be03a06270 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -40,7 +40,6 @@ extern int Docking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam); extern int SetHideOffline(WPARAM wParam, LPARAM lParam); ClcContact *CreateClcContact(void); -CListEvent *fnCreateEvent(void); void ReloadThemedOptions(); int TrayCalcChanged(const char *szChangedProto, int averageMode, int iProtoCount); void LoadButtonModule(); @@ -194,7 +193,6 @@ extern "C" int __declspec(dllexport) CListInitialise() pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged; pcli->pfnCompareContacts = CompareContacts; pcli->pfnCreateClcContact = CreateClcContact; - pcli->pfnCreateEvent = fnCreateEvent; pcli->pfnDocking_ProcessWindowMessage = Docking_ProcessWindowMessage; pcli->pfnGetDefaultFontSetting = GetDefaultFontSetting; pcli->pfnGetRowBottomY = RowHeight::getItemBottomY; diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h index ef75392261..b127c2cd39 100644 --- a/protocols/MSN/src/stdafx.h +++ b/protocols/MSN/src/stdafx.h @@ -705,7 +705,7 @@ public: __forceinline void Init(CMsnProto* proto) { m_proto = proto; } bool Load(); void Save(); - virtual bool Refresh(bool bForce = false) { return false; } + virtual bool Refresh(bool = false) { return false; } bool Expired(time_t t = time(NULL)); void Clear(); const char *Token(); diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 499b11ff4a..19f64a5762 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -139,13 +139,10 @@ void fnUnregisterFileDropping(HWND hwnd); struct CListEvent* fnAddEvent(CLISTEVENT *cle); CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx); -struct CListEvent* fnCreateEvent(void); -void fnFreeEvent(struct CListEvent* p); - -int fnEventsProcessContactDoubleClick(MCONTACT hContact); -int fnEventsProcessTrayDoubleClick(int); -int fnGetImlIconIndex(HICON hIcon); -int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent); +int fnEventsProcessContactDoubleClick(MCONTACT hContact); +int fnEventsProcessTrayDoubleClick(int); +int fnGetImlIconIndex(HICON hIcon); +int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent); /* clistmod.c */ int fnGetContactIcon(MCONTACT hContact); diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index c47b4a855d..50ea19f515 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -135,10 +135,8 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM) cli.pfnRowHitTest = fnRowHitTest; cli.pfnAddEvent = fnAddEvent; - cli.pfnCreateEvent = fnCreateEvent; cli.pfnEventsProcessContactDoubleClick = fnEventsProcessContactDoubleClick; cli.pfnEventsProcessTrayDoubleClick = fnEventsProcessTrayDoubleClick; - cli.pfnFreeEvent = fnFreeEvent; cli.pfnGetEvent = fnGetEvent; cli.pfnGetImlIconIndex = fnGetImlIconIndex; cli.pfnRemoveEvent = fnRemoveEvent; diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp index 2b49417a6b..8a6831b93e 100644 --- a/src/mir_app/src/clistevents.cpp +++ b/src/mir_app/src/clistevents.cpp @@ -144,7 +144,7 @@ CListEvent* fnAddEvent(CLISTEVENT *cle) } else i = cli.events.count; - CListEvent *p = cli.pfnCreateEvent(); + CListEvent *p = (CListEvent*)mir_calloc(sizeof(CListEvent)); if (p == NULL) return NULL; @@ -175,6 +175,13 @@ CListEvent* fnAddEvent(CLISTEVENT *cle) return p; } +static void fnFreeEvent(CListEvent *p) +{ + mir_free(p->pszService); + mir_free(p->pszTooltip); + mir_free(p); +} + // Removes an event from the contact list's queue // Returns 0 if the event was successfully removed, or nonzero if the event was not found int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent) @@ -197,7 +204,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent) CallService(MS_CLIST_GETCONTACTICON, (WPARAM)cli.events.items[i]->hContact, 1), 0); // Free any memory allocated to the event - cli.pfnFreeEvent(cli.events.items[i]); + fnFreeEvent(cli.events.items[i]); List_Remove((SortedList*)&cli.events, i); // count same protocoled events @@ -391,25 +398,14 @@ int InitCListEvents(void) return 0; } -CListEvent* fnCreateEvent(void) -{ - return (CListEvent*)mir_calloc(sizeof(CListEvent)); -} - -void fnFreeEvent(CListEvent *p) -{ - mir_free(p->pszService); - mir_free(p->pszTooltip); - mir_free(p); -} - void UninitCListEvents(void) { if (cli.events.count) KillTimer(NULL, flashTimerId); - for (int i=0; i < cli.events.count; i++) - cli.pfnFreeEvent((CListEvent*)cli.events.items[i]); + for (int i = 0; i < cli.events.count; i++) + fnFreeEvent(cli.events.items[i]); + List_Destroy((SortedList*)&cli.events); if (imlIcon != NULL) -- cgit v1.2.3