summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/solver3.cc9
-rw-r--r--apt-pkg/solver3.h3
2 files changed, 1 insertions, 11 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc
index 1532acf44..cbe318ac7 100644
--- a/apt-pkg/solver3.cc
+++ b/apt-pkg/solver3.cc
@@ -123,8 +123,6 @@ std::string APT::Solver::Clause::toString(pkgCache &cache, bool pretty, bool sho
std::string Solver::Work::toString(pkgCache &cache) const
{
std::ostringstream out;
- if (erased)
- out << "Erased ";
if (clause->optional)
out << "Optional ";
out << "Item (" << ssize_t(size <= clause->solutions.size() ? size : -1) << "@" << level << ") ";
@@ -506,11 +504,9 @@ bool Solver::Pop()
UndoOne();
// We need to remove any work that is at a higher level.
- // FIXME: We should just mark the entries as erased and only do a compaction
- // of the heap once we have a lot of erased entries in it.
trailLim.pop_back();
work.erase(std::remove_if(work.begin(), work.end(), [this](Work &w) -> bool
- { return w.level > decisionLevel() || w.erased; }),
+ { return w.level > decisionLevel(); }),
work.end());
std::make_heap(work.begin(), work.end());
@@ -572,9 +568,6 @@ bool Solver::Solve()
auto item = work.front();
std::pop_heap(work.begin(), work.end());
work.pop_back();
- // This item has been replaced with a new one. Remove it.
- if (item.erased)
- continue;
if (std::any_of(item.clause->solutions.begin(), item.clause->solutions.end(), [this](auto ver)
{ return value(ver) == LiftedBool::True; }))
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index ecb6e4160..a3ec859bb 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -509,9 +509,6 @@ struct APT::Solver::Solver::Work
/// Number of valid choices at insertion time
size_t size{0};
- // \brief This item should be removed from the queue.
- bool erased{false};
-
bool operator<(APT::Solver::Solver::Work const &b) const;
std::string toString(pkgCache &cache) const;
inline Work(const Clause *clause, level_type level) : clause(clause), level(level) {}