From 4c506f7bcb8651fa2364d324b395e33171e6352d Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Tue, 29 Dec 2015 17:50:16 +0000 Subject: Toaster: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@15965 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/services.cpp | 4 ---- plugins/Toaster/src/structs.h | 10 ---------- plugins/Toaster/src/toast_notification.h | 10 +++------- 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'plugins/Toaster') diff --git a/plugins/Toaster/src/services.cpp b/plugins/Toaster/src/services.cpp index 16c89edcb1..100a2387cf 100644 --- a/plugins/Toaster/src/services.cpp +++ b/plugins/Toaster/src/services.cpp @@ -181,9 +181,7 @@ static INT_PTR UnRegisterClass(WPARAM, LPARAM lParam) void CleanupClasses() { for (auto it = mp_Classes.begin(); it != mp_Classes.end(); ++it) - { delete it->second; - } mp_Classes.clear(); } @@ -246,9 +244,7 @@ static INT_PTR HideToast(WPARAM, LPARAM lParam) { ToastNotification* pNotification = reinterpret_cast(lParam); if (lstNotifications.getIndex(pNotification) != -1) - { lstNotifications.remove(pNotification); - } return 0; } void __stdcall HideAllToasts(void*) diff --git a/plugins/Toaster/src/structs.h b/plugins/Toaster/src/structs.h index ad8835487a..d304141f2f 100644 --- a/plugins/Toaster/src/structs.h +++ b/plugins/Toaster/src/structs.h @@ -50,14 +50,4 @@ struct ClassData : public MZeroedObject ClassData(int f, HICON h = NULL) : iFlags(f), hIcon(h), pPopupProc(NULL) { } -}; - -struct ToastHandlerData : public MZeroedObject -{ - MCONTACT hContact; - - WNDPROC pPopupProc; - void *vPopupData; - - ToastNotification *tstNotification; }; \ No newline at end of file diff --git a/plugins/Toaster/src/toast_notification.h b/plugins/Toaster/src/toast_notification.h index f57d397b5b..b99e3036a3 100644 --- a/plugins/Toaster/src/toast_notification.h +++ b/plugins/Toaster/src/toast_notification.h @@ -46,19 +46,15 @@ public: HRESULT OnDismiss(_In_ ABI::Windows::UI::Notifications::IToastNotification*, _In_ ABI::Windows::UI::Notifications::IToastDismissedEventArgs*); HRESULT OnFail(_In_ ABI::Windows::UI::Notifications::IToastNotification*, _In_ ABI::Windows::UI::Notifications::IToastFailedEventArgs*); - inline void* GetPluginData() - { - return _pvPopupData; + { return _pvPopupData; } inline MCONTACT GetContact() - { - return _hContact; + { return _hContact; } inline LRESULT ToastNotification::CallPopupProc(UINT uMsg) - { - return (_pfnPopupProc ? _pfnPopupProc((HWND)this, uMsg, 0, 0) : 0); + { return (_pfnPopupProc ? _pfnPopupProc((HWND)this, uMsg, 0, 0) : 0); } }; -- cgit v1.2.3