summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-12-29 17:50:16 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-12-29 17:50:16 +0000
commit4c506f7bcb8651fa2364d324b395e33171e6352d (patch)
tree88486925a980d17e9ab630741dab367075efb04b /plugins
parent79cd4ccc87c8a4f380bd29139c71c0995e565913 (diff)
Toaster: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@15965 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Toaster/src/services.cpp4
-rw-r--r--plugins/Toaster/src/structs.h10
-rw-r--r--plugins/Toaster/src/toast_notification.h10
3 files changed, 3 insertions, 21 deletions
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<ToastNotification*>(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);
}
};