[Aptitude-svn-commit] r4088 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Thu Sep 15 01:08:38 UTC 2005


Author: dburrows
Date: Thu Sep 15 01:08:36 2005
New Revision: 4088

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/immset.h
Log:
Fix clone()

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Thu Sep 15 01:08:36 2005
@@ -1,5 +1,12 @@
 2005-09-14  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/immset.h:
+
+	  Fix a silly error in the implementation of clone(): pass the
+	  value to the wtree_node constructor in addition to the children.
+	  Also fix constructor ordering in the set-from-a-node constructor
+	  (needed for the set's clone()).
+
 	* src/generic/problemresolver/solution.h:
 
 	  Add support for cloning an entire solution.

Modified: branches/aptitude-0.3/aptitude/src/generic/immset.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/immset.h	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/immset.h	Thu Sep 15 01:08:36 2005
@@ -366,7 +366,7 @@
       if(empty())
 	return wtree_node();
       else
-	return wtree_node(getLeft().clone(), getRight().clone());
+	return wtree_node(getVal(), getLeft().clone(), getRight().clone());
     }
   };
 
@@ -588,7 +588,7 @@
     }
 
     set(const node &n, const Compare &_value_compare)
-      :root(n), value_compare(_value_compare)
+      :value_compare(_value_compare), root(n)
     {
     }
 



More information about the Aptitude-svn-commit mailing list