summaryrefslogtreecommitdiff
path: root/src/modules/database
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/database
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/database')
-rw-r--r--src/modules/database/database.h2
-rw-r--r--src/modules/database/mdatabasecache.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/src/modules/database/database.h b/src/modules/database/database.h
index 286c651c02..7f581b341b 100644
--- a/src/modules/database/database.h
+++ b/src/modules/database/database.h
@@ -26,7 +26,7 @@ class MDatabaseCache : public MIDatabaseCache
HANDLE m_hCacheHeap;
char* m_lastSetting;
DBCachedContact *m_lastVL;
- CRITICAL_SECTION m_cs;
+ mir_cs m_cs;
LIST<DBCachedContact> m_lContacts;
LIST<DBCachedGlobalValue> m_lGlobalSettings;
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp
index c688a2efa4..7944a6bc86 100644
--- a/src/modules/database/mdatabasecache.cpp
+++ b/src/modules/database/mdatabasecache.cpp
@@ -40,13 +40,11 @@ MDatabaseCache::MDatabaseCache() :
m_lGlobalSettings(50, compareGlobals)
{
m_hCacheHeap = HeapCreate(0, 0, 0);
- InitializeCriticalSection(&m_cs);
}
MDatabaseCache::~MDatabaseCache()
{
HeapDestroy(m_hCacheHeap);
- DeleteCriticalSection(&m_cs);
}
/////////////////////////////////////////////////////////////////////////////////////////