diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
commit | 5ac26cff397836222eb8d51d866890f96321c601 (patch) | |
tree | 7ab4ff3ed3c36675df3d2da5a912311df499a8fa /yapp/popup_history_dlg.cpp | |
parent | 8e4bd51aa53343a76b1ddc9c7e47f3d56cb24437 (diff) |
Optimizations, removed redundant code, better compatibility with popup+
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@512 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/popup_history_dlg.cpp')
-rw-r--r-- | yapp/popup_history_dlg.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yapp/popup_history_dlg.cpp b/yapp/popup_history_dlg.cpp index b5673c7..ebf80bf 100644 --- a/yapp/popup_history_dlg.cpp +++ b/yapp/popup_history_dlg.cpp @@ -256,7 +256,7 @@ void LoadRenderer(HWND hWnd, int renderer) CallService((renderer == RENDER_HISTORYPP) ? MS_HPP_EG_WINDOW : MS_IEVIEW_WINDOW, 0, (LPARAM) &ieWnd); //create the IeView or H++ control.
- PopupHistoryWindowData *data = (PopupHistoryWindowData *) malloc(sizeof(PopupHistoryWindowData)); //create custom control data
+ PopupHistoryWindowData *data = (PopupHistoryWindowData *) mir_alloc(sizeof(PopupHistoryWindowData)); //create custom control data
data->hIEView = ieWnd.hwnd;
ShowWindow(data->hIEView, SW_SHOW);
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) data); //set it as the window's user data
@@ -286,7 +286,7 @@ void UnloadRenderer(HWND hWnd, int renderer) ieWnd.iType = IEW_DESTROY;
CallService((renderer == RENDER_HISTORYPP) ? MS_HPP_EG_WINDOW : MS_IEVIEW_WINDOW, 0, (LPARAM) &ieWnd);
- free(data);
+ mir_free(data);
}
break;
@@ -331,11 +331,9 @@ typedef void (*SIG_ADDEVENTS)(HWND hWnd, int renderer, TCHAR *filter, SIG_MATCHE IEVIEWEVENTDATA *CreateAndFillEventData(PopupHistoryData *popupItem)
{
- IEVIEWEVENTDATA *eventData = (IEVIEWEVENTDATA *) malloc(sizeof(IEVIEWEVENTDATA));
+ IEVIEWEVENTDATA *eventData = (IEVIEWEVENTDATA *) mir_calloc(sizeof(IEVIEWEVENTDATA));
if (eventData)
{
- memset(eventData, 0, sizeof(IEVIEWEVENTDATA));
-
eventData->cbSize = sizeof(IEVIEWEVENTDATA);
eventData->iType = IEED_EVENT_MESSAGE;
#ifdef UNICODE
@@ -401,7 +399,7 @@ void AddEventsCustomControl(HWND hWnd, int renderer, TCHAR *filter, SIG_MATCHESF {
cED = eventData;
eventData = eventData->next;
- free(cED);
+ mir_free(cED);
}
}
}
|