[Aptitude-svn-commit] r4003 - branches/aptitude-0.3/aptitude/src/generic

Daniel Burrows dburrows at costa.debian.org
Tue Aug 30 22:18:57 UTC 2005


Author: dburrows
Date: Tue Aug 30 22:18:56 2005
New Revision: 4003

Modified:
   branches/aptitude-0.3/aptitude/src/generic/setset.h
Log:
Use a vector instead of a set to store entries in setsets.

Modified: branches/aptitude-0.3/aptitude/src/generic/setset.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/setset.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/setset.h	Tue Aug 30 22:18:56 2005
@@ -48,7 +48,7 @@
 
   typedef std::pair<typename entries_list::size_type, Val> index_entry;
 
-  typedef std::map<Val, std::set<index_entry>, Compare> index_type;
+  typedef std::map<Val, std::vector<index_entry>, Compare> index_type;
 
   index_type sets_by_key;
 
@@ -75,7 +75,7 @@
 
     void operator()(const Val &v) const
     {
-      sets_by_key[v].insert(index_entry(index, v));
+      sets_by_key[v].push_back(index_entry(index, v));
     }
   };
 
@@ -104,9 +104,9 @@
 
       if(found != sets_by_key.end())
 	{
-	  const std::set<index_entry> &vals = found->second;
+	  const std::vector<index_entry> &vals = found->second;
 
-	  for(typename std::set<index_entry>::const_iterator vi
+	  for(typename std::vector<index_entry>::const_iterator vi
 		= vals.begin(); vi != vals.end(); ++vi)
 	    if(r(vi->second, v))
 	      {



More information about the Aptitude-svn-commit mailing list