[Debtags-commits] [svn] r1852 - in tagcoll/2.0: . tagcoll tagcoll/coll

Enrico Zini enrico at costa.debian.org
Wed Aug 16 15:13:41 UTC 2006


Author: enrico
Date: Wed Aug 16 15:13:39 2006
New Revision: 1852

Added:
   tagcoll/2.0/tagcoll/SmartHierarchy.cc
Modified:
   tagcoll/2.0/   (props changed)
   tagcoll/2.0/tagcoll/Makefile.am
   tagcoll/2.0/tagcoll/SmartHierarchy.h
   tagcoll/2.0/tagcoll/coll/fast.tcc
Log:
 r3176 at viaza:  enrico | 2006-08-16 16:13:31 +0100
 Put the template specialisation in the .cc file, otherwise it risks creating multiple references


Modified: tagcoll/2.0/tagcoll/Makefile.am
==============================================================================
--- tagcoll/2.0/tagcoll/Makefile.am	(original)
+++ tagcoll/2.0/tagcoll/Makefile.am	Wed Aug 16 15:13:39 2006
@@ -78,6 +78,7 @@
 		\
 		coll/intdiskindex.cc \
 		\
+		SmartHierarchy.cc \
 		TextFormat.cc
 
 libtagcoll_la_LIBADD = tagexpr/libtagexpr.la

Modified: tagcoll/2.0/tagcoll/SmartHierarchy.h
==============================================================================
--- tagcoll/2.0/tagcoll/SmartHierarchy.h	(original)
+++ tagcoll/2.0/tagcoll/SmartHierarchy.h	Wed Aug 16 15:13:39 2006
@@ -6,7 +6,7 @@
  */
 
 /* 
- * Copyright (C) 2003,2004,2005  Enrico Zini <enrico at debian.org>
+ * Copyright (C) 2003--2006  Enrico Zini <enrico at debian.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -167,10 +167,7 @@
 }
 
 template<>
-std::string mergeTags(const std::string& tag1, const std::string& tag2)
-{
-	return tag1 + ", " + tag2;
-}
+std::string mergeTags(const std::string& tag1, const std::string& tag2);
 
 
 // SmartHierarchyNode which also does merging of equivalent tags

Modified: tagcoll/2.0/tagcoll/coll/fast.tcc
==============================================================================
--- tagcoll/2.0/tagcoll/coll/fast.tcc	(original)
+++ tagcoll/2.0/tagcoll/coll/fast.tcc	Wed Aug 16 15:13:39 2006
@@ -201,7 +201,7 @@
 TAG Fast<ITEM, TAG>::findTagWithMaxCardinality(size_t& card) const
 {
 	card = 0;
-	TAG res;
+	TAG res = TAG();
 	for (typename std::map<TAG, std::set<ITEM> >::const_iterator i = tags.begin();
 			i != tags.end(); ++i)
 		if (i->second.size() > card)



More information about the Debtags-commits mailing list