summaryrefslogtreecommitdiff
path: root/plugins/FavContacts/src/contact_cache.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-07 13:18:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-07 13:18:55 +0000
commit198f78183833d6f9c7256286c23acda597575c2a (patch)
treed99d62d2b619b62333fce496a093e1bddf9e7162 /plugins/FavContacts/src/contact_cache.h
parentbf7e27ebc315e2663f6f271e9e631c724ad64082 (diff)
FavContacts:
- MCONTACTs sometimes were drawn as groups; - code cleaning; git-svn-id: http://svn.miranda-ng.org/main/trunk@9722 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FavContacts/src/contact_cache.h')
-rw-r--r--plugins/FavContacts/src/contact_cache.h23
1 files changed, 4 insertions, 19 deletions
diff --git a/plugins/FavContacts/src/contact_cache.h b/plugins/FavContacts/src/contact_cache.h
index b3ad95e027..dceba2b967 100644
--- a/plugins/FavContacts/src/contact_cache.h
+++ b/plugins/FavContacts/src/contact_cache.h
@@ -6,27 +6,13 @@ class CContactCache
public:
enum { INFOSIZE = 1024 };
-private:
-
struct TContactInfo
{
MCONTACT hContact;
float rate;
- TCHAR info[INFOSIZE];
bool infoLoaded;
-
- static int cmp(const TContactInfo *p1, const TContactInfo *p2)
- {
- if (p1->rate > p2->rate) return -1;
- if (p1->rate < p2->rate) return 1;
- return 0;
- }
-
- static int cmp2(const void *a1, const void *a2)
- {
- return cmp(*(const TContactInfo **)a1, *(const TContactInfo **)a2);
- }
-
+ TCHAR info[INFOSIZE];
+
TContactInfo()
{
info[0] = info[1] = 0;
@@ -36,7 +22,8 @@ private:
void LoadInfo();
};
- OBJLIST<TContactInfo> m_cache;
+private:
+ LIST<TContactInfo> m_cache;
unsigned long m_lastUpdate;
CRITICAL_SECTION m_cs;
@@ -48,8 +35,6 @@ public:
CContactCache();
~CContactCache();
- void Lock() { EnterCriticalSection(&m_cs); }
- void Unlock() { LeaveCriticalSection(&m_cs); }
void Rebuild();
MCONTACT get(int rate);