From 3e9e96f6718b13c069138fb40f24f065ac03c6b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Sep 2017 18:33:09 +0300 Subject: unneeded calls of DestroyServiceFunction() removed --- plugins/UserInfoEx/src/commonheaders.cpp | 10 ---------- plugins/UserInfoEx/src/stdafx.h | 2 -- plugins/UserInfoEx/src/svc_email.cpp | 4 ++-- 3 files changed, 2 insertions(+), 14 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/commonheaders.cpp b/plugins/UserInfoEx/src/commonheaders.cpp index 4a169f82ab..69488a542f 100644 --- a/plugins/UserInfoEx/src/commonheaders.cpp +++ b/plugins/UserInfoEx/src/commonheaders.cpp @@ -159,13 +159,3 @@ unsigned int hashSetting_M2(const wchar_t * key) #ifdef _DEBUG #pragma optimize( "", on ) #endif - -INT_PTR myDestroyServiceFunction(const char * key) { - //DestroyServiceFunction always return 0 therfore we must call ServiceExists to enshure it is delete - if (!ServiceExists(key)) return 0; - DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting(key)); //old hash - if (!ServiceExists(key)) return 0; - DestroyServiceFunction((HANDLE)(INT_PTR)hashSetting_M2(key)); //new MurmurHash2 - if (!ServiceExists(key)) return 0; - return 1; -} diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h index 45ae00f299..b8605c48ea 100644 --- a/plugins/UserInfoEx/src/stdafx.h +++ b/plugins/UserInfoEx/src/stdafx.h @@ -208,8 +208,6 @@ extern struct CountryListEntry *countries; DWORD hashSetting(LPCSTR szStr); //old miranda hash -INT_PTR myDestroyServiceFunction(const char * key); - static FORCEINLINE BOOL IsProtoOnline(LPSTR pszProto) { return pszProto && pszProto[0] && CallProtoService(pszProto, PS_GETSTATUS, NULL, NULL) >= ID_STATUS_ONLINE; diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index c47c9c5ac8..949a6cee5a 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -254,8 +254,8 @@ void SvcEMailLoadModule() SvcEMailEnableExtraIcons(); if (db_get_b(NULL, MODNAME, SET_EXTENDED_EMAILSERVICE, TRUE)) { // create own email send command - if (!myDestroyServiceFunction(MS_EMAIL_SENDEMAIL)) - CreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand); + DestroyServiceFunction(MS_EMAIL_SENDEMAIL); + CreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand); } } -- cgit v1.2.3