diff options
-rw-r--r-- | plugins/FavContacts/src/contact_cache.cpp | 4 | ||||
-rw-r--r-- | plugins/FavContacts/src/contact_cache.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index 6be8cc2543..fc6c2dc45d 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -10,8 +10,6 @@ static int CompareItem(const CContactCache::TContactInfo *p1, const CContactCach CContactCache::CContactCache() :
m_cache(50, CompareItem)
{
- InitializeCriticalSection(&m_cs);
-
int(__cdecl CContactCache::*pfn)(WPARAM, LPARAM);
pfn = &CContactCache::OnDbEventAdded;
HookEventObj(ME_DB_EVENT_ADDED, *(MIRANDAHOOKOBJ *)&pfn, this);
@@ -23,8 +21,6 @@ CContactCache::~CContactCache() {
for (int i = 0; i < m_cache.getCount(); i++)
delete m_cache[i];
-
- DeleteCriticalSection(&m_cs);
}
int __cdecl CContactCache::OnDbEventAdded(WPARAM hContact, LPARAM hEvent)
diff --git a/plugins/FavContacts/src/contact_cache.h b/plugins/FavContacts/src/contact_cache.h index dceba2b967..6bbd52a74b 100644 --- a/plugins/FavContacts/src/contact_cache.h +++ b/plugins/FavContacts/src/contact_cache.h @@ -25,7 +25,7 @@ public: private:
LIST<TContactInfo> m_cache;
unsigned long m_lastUpdate;
- CRITICAL_SECTION m_cs;
+ mir_cs m_cs;
int __cdecl OnDbEventAdded(WPARAM wParam, LPARAM lParam);
float GetEventWeight(unsigned long age);
|