summaryrefslogtreecommitdiff
path: root/apt-pkg/solver3.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-03 17:22:31 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-07 20:59:43 +0100
commitae2fc9b5121e4a253d1f81fcf14bcd2afd59538c (patch)
tree3cc8043e907c3f61b21dd3f476bee9ba5b0a8c46 /apt-pkg/solver3.h
parent276ecdaedc80b1c7106142810a0960cbeba13796 (diff)
solver3: Propagate single choice clauses as facts
This removes a bunch of complexity, and generalizes the propagation behavior, such that we don't need to do if (w.solutions.size() == 1 && not w.optional) Enqueue() else AddWork(w); in our callers.
Diffstat (limited to 'apt-pkg/solver3.h')
-rw-r--r--apt-pkg/solver3.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/solver3.h b/apt-pkg/solver3.h
index 1e1d8a56d..548c3b777 100644
--- a/apt-pkg/solver3.h
+++ b/apt-pkg/solver3.h
@@ -180,7 +180,7 @@ class Solver
// \brief Undo a single assignment / solved work item
void UndoOne();
// \brief Add work to our work queue.
- void AddWork(Work &&work);
+ [[nodiscard]] bool AddWork(Work &&work);
// \brief Rescore the work after a reject or a pop
void RescoreWorkIfNeeded();