summaryrefslogtreecommitdiff
path: root/src/modules/icolib/skin2icons.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-13 10:50:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-13 10:50:59 +0000
commit5df94ff719eccd04c7450df35fb5e3f2b36e2ee7 (patch)
tree440d736b199ff849ca0619adf355ffc73750ca7f /src/modules/icolib/skin2icons.cpp
parent70496fb739225b559a251f4518c946110aef718c (diff)
wrapping the most evident critical sections into a class
git-svn-id: http://svn.miranda-ng.org/main/trunk@9785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib/skin2icons.cpp')
-rw-r--r--src/modules/icolib/skin2icons.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 139a369eb2..35e77a8e37 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -39,7 +39,7 @@ int iconEventActive = 0;
BOOL bNeedRebuild = FALSE;
-CRITICAL_SECTION csIconList;
+mir_cs csIconList;
static int sttCompareSections(const SectionItem* p1, const SectionItem* p2)
{
@@ -837,7 +837,6 @@ int LoadIcoLibModule(void)
hIconBlank = LoadIconEx(NULL, MAKEINTRESOURCE(IDI_BLANK), 0);
- InitializeCriticalSection(&csIconList);
hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
@@ -873,7 +872,6 @@ void UnloadIcoLibModule(void)
DestroyServiceFunction(hIcoLib_IsManaged);
DestroyServiceFunction(hIcoLib_AddRef);
DestroyServiceFunction(hIcoLib_ReleaseIcon);
- DeleteCriticalSection(&csIconList);
for (i = iconList.getCount()-1; i >= 0; i--) {
IcolibItem* p = iconList[i];