[Aptitude-devel] r3180 - in branches/aptitude-0.3/aptitude: . src/generic/problemresolver
Daniel Burrows
dburrows@costa.debian.org
Thu, 28 Apr 2005 17:04:21 +0000
Author: dburrows
Date: Thu Apr 28 17:04:18 2005
New Revision: 3180
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
Log:
Add a proper operator!= for solutions, to fix the command-line resolver behavior.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Thu Apr 28 17:04:18 2005
@@ -2,6 +2,12 @@
* src/generic/problemresolver/problemresolver.h:
+ Write in a definition of operator!= for solutions -- I don't
+ know where the default was coming from, but it's wrong, wrong,
+ WRONG.
+
+ * src/generic/problemresolver/problemresolver.h:
+
Fix an ugliness in the debugging output.
* src/cmdline/cmdline_resolver.cc:
Modified: branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/problemresolver/problemresolver.h Thu Apr 28 17:04:18 2005
@@ -273,6 +273,16 @@
return &real_soln == &other.real_soln;
}
+ /** Without this method, some random function that produces
+ * incorrect results is used.
+ *
+ * \return \b true if the solutions are not the same solution.
+ */
+ bool operator!=(const generic_solution &other) const
+ {
+ return &real_soln != &other.real_soln;
+ }
+
operator bool() const
{
return real_soln != 0;