From df1c8cf224cee0c442a9f6b438b2c767326e4059 Mon Sep 17 00:00:00 2001 From: sje Date: Thu, 4 Oct 2007 17:14:42 +0000 Subject: implementation of red-black tree, backing Map template class :) git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@353 4f64403b-2f21-0410-a795-97e2b3489a10 --- meta2/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'meta2/common.cpp') diff --git a/meta2/common.cpp b/meta2/common.cpp index fe22092..17418fd 100644 --- a/meta2/common.cpp +++ b/meta2/common.cpp @@ -5,7 +5,11 @@ bool ContactHandle::operator==(const ContactHandle &other) const { } bool ContactHandle::operator<(const ContactHandle &other) const { + // these don't work, 'cause the comparison is not constant //return CallService(MS_CLIST_CONTACTSCOMPARE, (WPARAM)hContact, (LPARAM)other.handle()) < 0; + //return _tcscmp(ContactName(hContact), ContactName(other.handle())); + + // will produce a *very* unbalanced binary tree (metaMap) when contacts are added in order of handle - which they most likely are return hContact < other.handle(); } -- cgit v1.2.3