From 0ed074b1b6d10f263f33ffd771ad0ffa5ac70011 Mon Sep 17 00:00:00 2001
From: Kirill Volinsky <mataes2007@gmail.com>
Date: Thu, 30 Apr 2015 18:42:01 +0000
Subject: minus critical section

git-svn-id: http://svn.miranda-ng.org/main/trunk@13299 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/FavContacts/src/contact_cache.cpp | 4 ----
 plugins/FavContacts/src/contact_cache.h   | 2 +-
 2 files changed, 1 insertion(+), 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);
-- 
cgit v1.2.3