summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/hdr
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-30 19:30:44 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-30 19:30:44 +0000
commita6ce02772dde52fd7b1de9d4b7ba6949c8b2316f (patch)
tree40ab988463f4bda4d361c59acc3f4bd39f2aa2a5 /plugins/Clist_modern/src/hdr
parent54b79c7733c3005937f5ad5cd68672c2397493fe (diff)
minus critical section
git-svn-id: http://svn.miranda-ng.org/main/trunk@13311 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/hdr')
-rw-r--r--plugins/Clist_modern/src/hdr/modern_image_array.h2
-rw-r--r--plugins/Clist_modern/src/hdr/modern_skinned_profile.h51
2 files changed, 2 insertions, 51 deletions
diff --git a/plugins/Clist_modern/src/hdr/modern_image_array.h b/plugins/Clist_modern/src/hdr/modern_image_array.h
index e45b3c4fef..a5acd94588 100644
--- a/plugins/Clist_modern/src/hdr/modern_image_array.h
+++ b/plugins/Clist_modern/src/hdr/modern_image_array.h
@@ -52,7 +52,7 @@ struct IMAGE_ARRAY_DATA
void * lpBits;
// CS
- CRITICAL_SECTION cs;
+ mir_cs cs;
// Array
IMAGE_ARRAY_DATA_NODE *nodes;
diff --git a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h
index 6da6e33821..87b4498313 100644
--- a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h
+++ b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h
@@ -47,55 +47,6 @@ public:
};
-class CAutoCriticalSection
-{
-public:
- CAutoCriticalSection() //Init critical section here
- : _pLinkedCS(NULL)
- {
- InitializeCriticalSection(&_CS);
- _ifCSOwner = true;
- _ifLocked = false;
- }
- CAutoCriticalSection(CAutoCriticalSection& Locker, bool doLock = true)
- : _pLinkedCS(&Locker)
- {
- _ifCSOwner = false;
- _ifLocked = false;
- if (doLock)
- Lock();
- }
- ~CAutoCriticalSection() // Leave if auto locker, and destroy if not
- {
- if (_ifLocked)
- Unlock();
- if (_ifCSOwner)
- DeleteCriticalSection(&_CS);
- }
-
- void Lock() // Enter Section
- {
- if (_ifLocked) return;
- if (_ifCSOwner) EnterCriticalSection(&_CS);
- else _pLinkedCS->Lock();
- _ifLocked = true;
- return;
- }
- void Unlock() // Leave Section
- {
- if (!_ifLocked) return;
- if (_ifCSOwner) LeaveCriticalSection(&_CS);
- else _pLinkedCS->Unlock();
- _ifLocked = false;
- }
-
-private:
- CRITICAL_SECTION _CS;
- CAutoCriticalSection * _pLinkedCS;
- bool _ifCSOwner;
- bool _ifLocked;
-};
-
class ValueVariant
{
public:
@@ -225,7 +176,7 @@ private:
ValueVariant* _GetValue(const char * szSection, const char * szKey);
- CAutoCriticalSection _Lock; // critical section to matable skinned profile access
+ mir_cs _Lock; // critical section to matable skinned profile access
public:
static CSkinnedProfile* SkinProfile() { return &_me; }