summaryrefslogtreecommitdiff
path: root/plugins/FlashAvatars/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-06 22:12:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-06 22:12:20 +0000
commit9de0202a0b12838d505825413c3cbcce5edabc11 (patch)
tree6f1f707f3e17c19e5cd08745e76c5299f9ba827b /plugins/FlashAvatars/src
parent4e3088029101cc1e9bbc46984910a47bc0530e8f (diff)
cleanup of the unnecessary UnhookEvent() calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@3909 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FlashAvatars/src')
-rw-r--r--plugins/FlashAvatars/src/cflash.cpp35
1 files changed, 11 insertions, 24 deletions
diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp
index 543ec53e71..6f7b25eec0 100644
--- a/plugins/FlashAvatars/src/cflash.cpp
+++ b/plugins/FlashAvatars/src/cflash.cpp
@@ -63,8 +63,6 @@ HANDLE hNetlibUser;
static char pluginName[64];
-static HANDLE hHooks[4];
-static HANDLE hServices[7];
static CriticalSection cs;
static HANDLE hAvatarsFolder = NULL;
@@ -575,17 +573,17 @@ static int systemModulesLoaded(WPARAM /*wParam*/, LPARAM /*lParam*/)
init();
MyAtlAxAttachControl = (LPAtlAxAttachControl)GetProcAddress(hAtl, "AtlAxAttachControl");
- hServices[0] = CreateServiceFunction(MS_FAVATAR_DESTROY, destroyAvatar);
- hServices[1] = CreateServiceFunction(MS_FAVATAR_MAKE, makeAvatar);
- hServices[2] = CreateServiceFunction(MS_FAVATAR_RESIZE, resizeAvatar);
- hServices[3] = CreateServiceFunction(MS_FAVATAR_SETPOS, setPos);
- hServices[4] = CreateServiceFunction(MS_FAVATAR_GETINFO, getInfo);
- hServices[5] = CreateServiceFunction(MS_FAVATAR_SETEMOFACE, setEmoFace);
- hServices[6] = CreateServiceFunction(MS_FAVATAR_SETBKCOLOR, setBkColor);
+ CreateServiceFunction(MS_FAVATAR_DESTROY, destroyAvatar);
+ CreateServiceFunction(MS_FAVATAR_MAKE, makeAvatar);
+ CreateServiceFunction(MS_FAVATAR_RESIZE, resizeAvatar);
+ CreateServiceFunction(MS_FAVATAR_SETPOS, setPos);
+ CreateServiceFunction(MS_FAVATAR_GETINFO, getInfo);
+ CreateServiceFunction(MS_FAVATAR_SETEMOFACE, setEmoFace);
+ CreateServiceFunction(MS_FAVATAR_SETBKCOLOR, setBkColor);
- hHooks[1] = HookEvent(ME_DB_EVENT_ADDED, eventAdded);
- hHooks[2] = HookEvent("Miranda/StatusChange/ContactStatusChanged", statusChanged); // NewStatusNotify
- hHooks[3] = HookEvent(ME_CLIST_STATUSMODECHANGE, ownStatusChanged);
+ HookEvent(ME_DB_EVENT_ADDED, eventAdded);
+ HookEvent("Miranda/StatusChange/ContactStatusChanged", statusChanged); // NewStatusNotify
+ HookEvent(ME_CLIST_STATUSMODECHANGE, ownStatusChanged);
NETLIBUSER nl_user = {0};
nl_user.cbSize = sizeof(nl_user);
@@ -619,8 +617,7 @@ extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
- hHooks[0] = HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
-
+ HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
return 0;
}
@@ -642,16 +639,6 @@ extern "C" int __declspec(dllexport) Unload(void)
FlashList.destroy();
}
- int i;
-
- for (i = 0; i < SIZEOF(hHooks); i++)
- if (hHooks[i])
- UnhookEvent(hHooks[i]);
-
- for (i = 0; i < SIZEOF(hServices); i++)
- if (hServices[i])
- DestroyServiceFunction(hServices[i]);
-
if (hNetlibUser)
CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);