From 8712f0c3591941711f8407fc069a1fbd98efbd65 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jan 2014 20:20:47 +0000 Subject: added destructor LIST::~LIST, that calls destroy() automatically. thus manual call of destroy() might be removed from: - class destructors; - Unload() plugin's functions (for global data); - local (auto) variables in functions finalizations git-svn-id: http://svn.miranda-ng.org/main/trunk@7467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/AniSmileyObject.cpp | 1 - plugins/SmileyAdd/src/SmileyBase.cpp | 6 ------ plugins/SmileyAdd/src/general.h | 1 - plugins/SmileyAdd/src/main.cpp | 2 -- plugins/SmileyAdd/src/services.cpp | 3 +-- 5 files changed, 1 insertion(+), 12 deletions(-) (limited to 'plugins/SmileyAdd') diff --git a/plugins/SmileyAdd/src/AniSmileyObject.cpp b/plugins/SmileyAdd/src/AniSmileyObject.cpp index 0b54d08968..0e7d0e9594 100644 --- a/plugins/SmileyAdd/src/AniSmileyObject.cpp +++ b/plugins/SmileyAdd/src/AniSmileyObject.cpp @@ -415,6 +415,5 @@ void DestroyAniSmileys(void) for (int i=0; i < regAniSmileys.getCount(); i++) delete regAniSmileys[i]; - regAniSmileys.destroy(); } diff --git a/plugins/SmileyAdd/src/SmileyBase.cpp b/plugins/SmileyAdd/src/SmileyBase.cpp index 94f89961de..b2d496c347 100644 --- a/plugins/SmileyAdd/src/SmileyBase.cpp +++ b/plugins/SmileyAdd/src/SmileyBase.cpp @@ -380,9 +380,3 @@ int CheckForTip(int x, int y, HWND hwnd, TCHAR** smltxt) return -1; } - -void DestroySmileyBase(void) -{ - regSmileys.destroy(); -} - diff --git a/plugins/SmileyAdd/src/general.h b/plugins/SmileyAdd/src/general.h index 8bd96c3eb9..489bd06b3a 100644 --- a/plugins/SmileyAdd/src/general.h +++ b/plugins/SmileyAdd/src/general.h @@ -186,7 +186,6 @@ void ProcessAllInputAreas(bool restoreText); void RichEditData_Destroy(void); void CloseSmileys(void); -void DestroySmileyBase(void); void DestroyAniSmileys(void); void UrlDecode(char* str); diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index ff989721a0..7279cfac60 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -135,7 +135,6 @@ extern "C" __declspec(dllexport) int Unload(void) RichEditData_Destroy(); DestroyAniSmileys(); - DestroySmileyBase(); g_SmileyCategories.ClearAll(); g_SmileyPackCStore.ClearAndFreeAll(); @@ -144,7 +143,6 @@ extern "C" __declspec(dllexport) int Unload(void) DestroyGdiPlus(); DownloadClose(); - menuHandleArray.destroy(); mir_free(metaProtoName); return 0; diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index f42e23978b..00f27437c6 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -362,8 +362,7 @@ INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam) SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3); if (smct != NULL) opt.WriteContactCategory(hContact, smct->GetName()); - else - { + else { CMString empty; if (lParam == 1) empty = _T(""); opt.WriteContactCategory(hContact, empty); -- cgit v1.2.3