[Debtags-commits] [svn] r1344 - in debtags-edit/trunk: . src

Enrico Zini enrico at costa.debian.org
Mon Sep 5 20:53:15 UTC 2005


Author: enrico
Date: Mon Sep  5 20:53:14 2005
New Revision: 1344

Modified:
   debtags-edit/trunk/   (props changed)
   debtags-edit/trunk/README
   debtags-edit/trunk/src/TagMenu.cc
Log:
 r5158 at viaza:  enrico | 2005-09-05 22:53:10 +0200
 Applied sanity patch from mornfall


Modified: debtags-edit/trunk/README
==============================================================================
--- debtags-edit/trunk/README	(original)
+++ debtags-edit/trunk/README	Mon Sep  5 20:53:14 2005
@@ -85,6 +85,10 @@
 
 These are the TODO-list items completed so far::
 
+* Done in 1.1.1
+
+ + Ported to the refactored libapt-front
+
 * Done in 1.1
 
  + Ported to libapt-front

Modified: debtags-edit/trunk/src/TagMenu.cc
==============================================================================
--- debtags-edit/trunk/src/TagMenu.cc	(original)
+++ debtags-edit/trunk/src/TagMenu.cc	Mon Sep  5 20:53:14 2005
@@ -46,20 +46,10 @@
 template<class DOC>
 void TagMenu<DOC>::populateWith(const OpSet<Tag>& tags) throw ()
 {
-	// Needs std:: not to be confused with some other map
+	// Needs std:: not to be confused with some other map in gtkmm
 	std::map<Facet, vector<Tag> > contents;
-    for (OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
-	{
-		std::map<Facet, vector<Tag> >::iterator j = contents.find(i->facet());
-		if (j != contents.end())
-			j->second.push_back(*i);
-		else
-		{
-			std::vector<Tag> v;
-			v.push_back(*i);
-			contents.insert(pair<Facet, vector<Tag> >(i->facet(), v));
-		}
-	}
+	for (OpSet<Tag>::const_iterator i = tags.begin(); i != tags.end(); i++)
+		contents[i->facet()].push_back(*i);
 
 	for (std::map<Facet, vector<Tag> >::const_iterator i = contents.begin(); i != contents.end(); i++)
 	{



More information about the Debtags-commits mailing list