summaryrefslogtreecommitdiff
path: root/src/modules/icolib
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
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')
-rw-r--r--src/modules/icolib/IcoLib.h2
-rw-r--r--src/modules/icolib/skin2icons.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/modules/icolib/IcoLib.h b/src/modules/icolib/IcoLib.h
index d743e0e4fd..337de4be7d 100644
--- a/src/modules/icolib/IcoLib.h
+++ b/src/modules/icolib/IcoLib.h
@@ -98,7 +98,7 @@ HICON IconItem_GetIcon(IcolibItem* item, bool big);
int SkinOptionsInit(WPARAM, LPARAM);
-extern CRITICAL_SECTION csIconList;
+extern mir_cs csIconList;
extern LIST<IcolibItem> iconList;
extern LIST<SectionItem> sectionList;
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];