diff options
author | George Hazan <george.hazan@gmail.com> | 2016-01-28 13:20:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-01-28 13:20:34 +0000 |
commit | 6c38539e9b3d5a72280950310253759085e96f01 (patch) | |
tree | 8e6dcaee71ed7dbf0f2419e1ed6d71130e1a8722 /src | |
parent | a040f3a8dbcc17d8a3a50a9594b3226dce28788c (diff) |
unused functions removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@16179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clc.h | 11 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clistevents.cpp | 28 |
3 files changed, 16 insertions, 25 deletions
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)
|