diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 09:52:33 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 09:52:33 +0000 |
commit | eeebc45e0085f3844cf515adf3e8f3da97db623c (patch) | |
tree | 66cd219832887ac176b20d0225db88d9a74f3abf /plugins/mTextControl/src/ImageDataObjectHlp.cpp | |
parent | 329f87401432b166f47ae076a58d12029863649c (diff) |
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13287 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src/ImageDataObjectHlp.cpp')
-rw-r--r-- | plugins/mTextControl/src/ImageDataObjectHlp.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/mTextControl/src/ImageDataObjectHlp.cpp b/plugins/mTextControl/src/ImageDataObjectHlp.cpp index 0ff5b9c479..423e92c0a2 100644 --- a/plugins/mTextControl/src/ImageDataObjectHlp.cpp +++ b/plugins/mTextControl/src/ImageDataObjectHlp.cpp @@ -30,12 +30,7 @@ struct EMFCACHE EMFCACHE *next;
} *emfCache = 0;
int emfCacheSize = 0;
-CRITICAL_SECTION csEmfCache;
-
-void LoadEmfCache()
-{
- InitializeCriticalSection(&csEmfCache);
-}
+mir_cs csEmfCache;
void UnloadEmfCache()
{
@@ -45,13 +40,12 @@ void UnloadEmfCache() delete emfCache;
emfCache = tmp;
}
- DeleteCriticalSection(&csEmfCache);
}
HENHMETAFILE CacheIconToEmf(HICON hIcon)
{
HENHMETAFILE result = 0;
- EnterCriticalSection(&csEmfCache);
+ mir_cslock lck(csEmfCache);
for (EMFCACHE *p = emfCache; p; p = p->next)
if (p->hIcon == hIcon)
{
@@ -103,8 +97,6 @@ HENHMETAFILE CacheIconToEmf(HICON hIcon) emfCacheSize = 20;
}
- LeaveCriticalSection(&csEmfCache);
-
return result;
}
|