[Debtags-commits] [svn] r1735 - in tagcoll/2.0: . tagcoll tagcoll/utils

Enrico Zini enrico at costa.debian.org
Tue May 9 00:57:33 UTC 2006


Author: enrico
Date: Tue May  9 00:57:30 2006
New Revision: 1735

Added:
   tagcoll/2.0/tagcoll/utils/
   tagcoll/2.0/tagcoll/utils/set.h
Removed:
   tagcoll/2.0/tagcoll/setutils.h
Modified:
   tagcoll/2.0/   (props changed)
   tagcoll/2.0/tagcoll/Implications.cc
   tagcoll/2.0/tagcoll/InputMerger.cc
   tagcoll/2.0/tagcoll/Makefile.am
   tagcoll/2.0/tagcoll/PatchCollection.cc
   tagcoll/2.0/tagcoll/ReadonlyCollection.h
Log:
 r2622 at viaza:  enrico | 2006-05-08 13:05:21 -0500
 Moved setutils into utils/set


Modified: tagcoll/2.0/tagcoll/Implications.cc
==============================================================================
--- tagcoll/2.0/tagcoll/Implications.cc	(original)
+++ tagcoll/2.0/tagcoll/Implications.cc	Tue May  9 00:57:30 2006
@@ -42,7 +42,7 @@
 	{
 		// If the tag is already in res, then also all his destinations are
 		// already there
-		if (!set_contains(res, *t) && !set_contains(seen, *t))
+		if (!utils::set_contains(res, *t) && !utils::set_contains(seen, *t))
 		{
 			res |= *t;
 			res |= getDestinations(*t, seen | tag);
@@ -67,7 +67,7 @@
 	// Try all paths
 	for (typename std::set<TAG>::const_iterator t = i->second.begin();
 			t != i->second.end(); t++)
-		if (!set_contains(seen, *t) && reaches(*t, tag2, seen | tag1))
+		if (!utils::set_contains(seen, *t) && reaches(*t, tag2, seen | tag1))
 			return true;
 
 	// Nothing has been found

Modified: tagcoll/2.0/tagcoll/InputMerger.cc
==============================================================================
--- tagcoll/2.0/tagcoll/InputMerger.cc	(original)
+++ tagcoll/2.0/tagcoll/InputMerger.cc	Tue May  9 00:57:30 2006
@@ -68,7 +68,7 @@
 	std::set<ITEM> res;
 	for (typename map< ITEM, std::set<TAG> >::const_iterator i = coll.begin();
 			i != coll.end(); i++)
-		if (set_contains(i->second, tags))
+		if (utils::set_contains(i->second, tags))
 			res |= i->first;
 	return res;
 }
@@ -145,7 +145,7 @@
 
 	for (typename map< T, std::set<Tag> >::const_iterator i = coll.begin();
 			i != coll.end(); i++)
-		if (set_contains(i->second, (ts)))
+		if (utils::set_contains(i->second, (ts)))
 			tags |= i->second - ts;
 	
 	return tags;
@@ -159,7 +159,7 @@
 	for (typename map< T, std::set<Tag> >::const_iterator i = coll.begin();
 			i != coll.end(); i++)
 	{
-		int dist = set_distance(tags, i->second);
+		int dist = utils::set_distance(tags, i->second);
 		if (dist >= 0 && dist <= maxdistance)
 			res |= i->first;
 	}

Modified: tagcoll/2.0/tagcoll/Makefile.am
==============================================================================
--- tagcoll/2.0/tagcoll/Makefile.am	(original)
+++ tagcoll/2.0/tagcoll/Makefile.am	Tue May  9 00:57:30 2006
@@ -6,7 +6,7 @@
 
 # Include the .cc files that contain template definitions
 tagcollinclude_HEADERS = \
-		setutils.h \
+		utils/set.h \
 		ParserBase.h \
 		MemParserInput.h \
 		StringParserInput.h \

Modified: tagcoll/2.0/tagcoll/PatchCollection.cc
==============================================================================
--- tagcoll/2.0/tagcoll/PatchCollection.cc	(original)
+++ tagcoll/2.0/tagcoll/PatchCollection.cc	Tue May  9 00:57:30 2006
@@ -44,7 +44,7 @@
 	// Then check items in the patch
 	for (typename Patches::const_iterator i = m_changes.begin();
 			i != m_changes.end(); i++)
-		if (set_contains(m_changes.patch(i->first, coll.getTags(i->first)), tag))
+		if (utils::set_contains(m_changes.patch(i->first, coll.getTags(i->first)), tag))
 			res |= i->first;
 
 	return res;
@@ -96,7 +96,7 @@
 	// Then check items in the patch
 	for (typename Patches::const_iterator i = m_changes.begin();
 			i != m_changes.end(); i++)
-		if (set_contains(i->second.getAdded(), tag))
+		if (utils::set_contains(i->second.getAdded(), tag))
 			return true;
 
 	return false;
@@ -189,9 +189,9 @@
 	for (typename Patches::const_iterator i = m_changes.begin();
 			i != m_changes.end(); i++)
 	{
-		if (set_contains(i->second.getAdded(), tag))
+		if (utils::set_contains(i->second.getAdded(), tag))
 			card++;
-		else if (set_contains(i->second.getRemoved(), tag))
+		else if (utils::set_contains(i->second.getRemoved(), tag))
 			card--;
 	}
 

Modified: tagcoll/2.0/tagcoll/ReadonlyCollection.h
==============================================================================
--- tagcoll/2.0/tagcoll/ReadonlyCollection.h	(original)
+++ tagcoll/2.0/tagcoll/ReadonlyCollection.h	Tue May  9 00:57:30 2006
@@ -23,7 +23,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  */
 
-#include <tagcoll/setutils.h>
+#include <tagcoll/utils/set.h>
 
 namespace tagcoll
 {
@@ -251,7 +251,7 @@
 		// Then keep only those within the given distance
 		for (typename coll_traits<Self>::itemset_type::const_iterator i = packages.begin(); i != packages.end(); i++)
 		{
-			int dist = set_distance(tags, getTagsOfItem(*i));
+			int dist = utils::set_distance(tags, getTagsOfItem(*i));
 			if (dist >= 0 && dist <= maxdistance)
 				res |= *i;
 		}



More information about the Debtags-commits mailing list